@Test
public void shouldReturnInternalServerErrorIfDeleteFailsBecauseADatabaseExceptionIsThrownInsideDistributedStore() {

    when(distributedStore.delete(KEY)).thenReturn(Futures.<Void>immediateFailedFuture(new StorageException(new SQLException("DATABASE GONE"))));
    assertThatValidDeleteRequestReturnsErrorStatus(ClientResponse.Status.INTERNAL_SERVER_ERROR);
}