@Test
public void shouldReturnServiceUnavailableWithNoLocationWhenNotLeaderExceptionIsThrownAndTheLeaderIsNull() {

    when(distributedStore.getAll()).thenReturn(Futures.<Collection<KeyValue>>immediateFailedFuture(new NotLeaderException(self, null)));
    ClientResponse response = getClientResponseForUnsuccessfulRequest();
    assertThat(response.getClientResponseStatus(), equalTo(ClientResponse.Status.SERVICE_UNAVAILABLE));
    assertThat(response.getLocation(), nullValue());
}