use of org.zalando.nakadi.exceptions.runtime.NoStorageException in project nakadi by zalando.
the class StorageServiceTest method testDeleteNonExistingStorage.
@Test
public void testDeleteNonExistingStorage() throws Exception {
doThrow(new NoStorageException("")).when(storageDbRepository).deleteStorage("s");
final Result<Void> result = storageService.deleteStorage("s");
final Result<Void> expectedResult = Result.notFound("No storage with ID s");
assertThat(result.getProblem().getStatus(), equalTo(expectedResult.getProblem().getStatus()));
assertThat(result.getProblem().getDetail(), equalTo(expectedResult.getProblem().getDetail()));
}
Aggregations