@Test
public void testGetPartialSuccessReaderUnavailable() throws Throwable {

  Reader mockReader = mock(Reader.class);
  when(mockResourcePartitionMap.getReader(eq(RESOURCE), eq("1"))).thenThrow(
      new TerrapinGetException("", TerrapinGetErrorCode.NOT_SERVING_PARTITION));
  when(mockResourcePartitionMap.getReader(eq(RESOURCE), eq("2"))).thenReturn(mockReader);
  when(mockReader.getValues(eq(KEYS_PART_2))).thenAnswer(GET_VALUES_ANSWER);
  TerrapinResponse response = serverImpl.get(prepareRequest()).get();
  Map<ByteBuffer, TerrapinSingleResponse> responseMap = response.getResponseMap();
  assertEquals(9, responseMap.size());
  // Ensure that the first batch throws back a NOT_SERVING_PARTITION.
  for (ByteBuffer key : KEYS_PART_1) {
    assertEquals(TerrapinGetErrorCode.NOT_SERVING_PARTITION,
                 responseMap.get(key).getErrorCode());
  }
  // Ensure that the remaining keys arrive correctly.
  checkLookup(KEYS_PART_2, responseMap);
}