diff --git a/validator/api/src/test/java/tech/pegasys/teku/validator/api/GraffitiManagerTest.java b/validator/api/src/test/java/tech/pegasys/teku/validator/api/GraffitiManagerTest.java index 0a5155bebbb..8d6720e3614 100644 --- a/validator/api/src/test/java/tech/pegasys/teku/validator/api/GraffitiManagerTest.java +++ b/validator/api/src/test/java/tech/pegasys/teku/validator/api/GraffitiManagerTest.java @@ -141,7 +141,8 @@ void deleteGraffiti_shouldReturnErrorMessageWhenUnableToDeleteFile(@TempDir fina assertThat(file.getParentFile().setWritable(false)).isTrue(); assertThatThrownBy(() -> manager.deleteGraffiti(publicKey)) - .isInstanceOf(GraffitiManagementException.class); + .isInstanceOf(GraffitiManagementException.class) + .hasMessage("Unable to delete graffiti for validator " + publicKey); assertThat(file.exists()).isTrue(); } diff --git a/validator/api/src/test/java/tech/pegasys/teku/validator/api/UpdatableGraffitiProviderTest.java b/validator/api/src/test/java/tech/pegasys/teku/validator/api/UpdatableGraffitiProviderTest.java index 51c40fbcb70..e6fa8fcd8ad 100644 --- a/validator/api/src/test/java/tech/pegasys/teku/validator/api/UpdatableGraffitiProviderTest.java +++ b/validator/api/src/test/java/tech/pegasys/teku/validator/api/UpdatableGraffitiProviderTest.java @@ -70,29 +70,29 @@ public void get_shouldDelegateToDefaultProviderWhenStorageProviderFails() throws } @Test - void getWithThrowable_shouldGetStorageGraffitiWhenAvailable() { + void getWithThrowable_shouldGetStorageGraffitiWhenAvailable() throws Throwable { provider = new UpdatableGraffitiProvider(() -> Optional.of(storageGraffiti), Optional::empty); - assertThat(provider.get()).hasValue(storageGraffiti); + assertThat(provider.getWithThrowable()).hasValue(storageGraffiti); } @Test - void getWithThrowable_shouldGetStorageGraffitiWhenBothAvailable() { + void getWithThrowable_shouldGetStorageGraffitiWhenBothAvailable() throws Throwable { provider = new UpdatableGraffitiProvider( () -> Optional.of(storageGraffiti), () -> Optional.of(defaultGraffiti)); - assertThat(provider.get()).hasValue(storageGraffiti); + assertThat(provider.getWithThrowable()).hasValue(storageGraffiti); } @Test - void getWithThrowable_shouldGetDefaultGraffitiWhenStorageEmpty() { + void getWithThrowable_shouldGetDefaultGraffitiWhenStorageEmpty() throws Throwable { provider = new UpdatableGraffitiProvider(Optional::empty, () -> Optional.of(defaultGraffiti)); - assertThat(provider.get()).hasValue(defaultGraffiti); + assertThat(provider.getWithThrowable()).hasValue(defaultGraffiti); } @Test - void getWithThrowable_shouldBeEmptyWhenBothEmpty() { + void getWithThrowable_shouldBeEmptyWhenBothEmpty() throws Throwable { provider = new UpdatableGraffitiProvider(Optional::empty, Optional::empty); - assertThat(provider.get()).isEmpty(); + assertThat(provider.getWithThrowable()).isEmpty(); } @Test