@@ -162,8 +162,7 @@ private void checkStoredGraffitiFile(final BLSPublicKey publicKey, final String
162
162
}
163
163
164
164
@ Test
165
- void getGraffitiFromStorage_shouldGetGraffitiFromStorage (@ TempDir final Path tempDir )
166
- throws IOException {
165
+ void getGraffiti_shouldGetGraffitiFromStorage (@ TempDir final Path tempDir ) throws IOException {
167
166
dataDirLayout = new SimpleDataDirLayout (tempDir );
168
167
manager = new GraffitiManager (dataDirLayout );
169
168
final Path filePath = getGraffitiManagementDir ().resolve (getFileName (publicKey ));
@@ -174,8 +173,15 @@ void getGraffitiFromStorage_shouldGetGraffitiFromStorage(@TempDir final Path tem
174
173
}
175
174
176
175
@ Test
177
- void getGraffitiFromStorage_shouldReturnEmptyWhenFileTooBig (@ TempDir final Path tempDir )
178
- throws IOException {
176
+ void getGraffiti_shouldReturnEmptyWhenFileNotExist (@ TempDir final Path tempDir ) {
177
+ dataDirLayout = new SimpleDataDirLayout (tempDir );
178
+ manager = new GraffitiManager (dataDirLayout );
179
+
180
+ assertThat (manager .getGraffiti (publicKey )).isEmpty ();
181
+ }
182
+
183
+ @ Test
184
+ void getGraffiti_shouldReturnEmptyWhenFileTooBig (@ TempDir final Path tempDir ) throws IOException {
179
185
dataDirLayout = new SimpleDataDirLayout (tempDir );
180
186
manager = new GraffitiManager (dataDirLayout );
181
187
@@ -188,7 +194,7 @@ void getGraffitiFromStorage_shouldReturnEmptyWhenFileTooBig(@TempDir final Path
188
194
189
195
@ Test
190
196
@ DisabledOnOs (OS .WINDOWS ) // Can't set permissions on Windows
191
- void getGraffitiFromStorage_shouldReturnEmptyWhenNotReadableFile (@ TempDir final Path tempDir )
197
+ void getGraffiti_shouldReturnEmptyWhenNotReadableFile (@ TempDir final Path tempDir )
192
198
throws IOException {
193
199
dataDirLayout = new SimpleDataDirLayout (tempDir );
194
200
manager = new GraffitiManager (dataDirLayout );
@@ -200,8 +206,7 @@ void getGraffitiFromStorage_shouldReturnEmptyWhenNotReadableFile(@TempDir final
200
206
}
201
207
202
208
@ Test
203
- void getGraffitiFromStorage_shouldReturnEmptyWhenFileEmpty (@ TempDir final Path tempDir )
204
- throws IOException {
209
+ void getGraffiti_shouldReturnEmptyWhenFileEmpty (@ TempDir final Path tempDir ) throws IOException {
205
210
dataDirLayout = new SimpleDataDirLayout (tempDir );
206
211
manager = new GraffitiManager (dataDirLayout );
207
212
final Path filePath = getGraffitiManagementDir ().resolve (getFileName (publicKey ));
0 commit comments