@Test
public void shouldReturnInternalServerErrorIfSetFailsBecauseADatabaseExceptionIsThrownInsideDistributedStore() {

    when(distributedStore.set(KEY, setValue)).thenReturn(Futures.<KeyValue>immediateFailedFuture(new StorageException(new SQLException("DATABASE GONE"))));
    assertThatValidSetRequestReturnsErrorStatus(ClientResponse.Status.INTERNAL_SERVER_ERROR);
}