@Test
public void shouldReturnInternalServerErrorIfDeleteFailsBecauseAnExceptionIsThrownInServiceCode() {

    when(distributedStore.delete(KEY)).thenThrow(new IllegalStateException("service code terminated unexpectedly"));
    assertThatValidDeleteRequestReturnsErrorStatus(ClientResponse.Status.INTERNAL_SERVER_ERROR);
}