source: class TerrapinServerInternalImplTest {
  
    @MockitoAnnotations.Mock
    private ResourcePartitionMap mockResourcePartitionMap;
    private TerrapinServerInternalImpl serverImpl;
    private static final String RESOURCE;
    private static final Map<ByteBuffer, Pair<ByteBuffer, Throwable>> KEY_VALUES_MAP;
    private static final List<ByteBuffer> KEYS_PART_1;
    private static final List<ByteBuffer> KEYS_PART_2;
    private static final Answer GET_VALUES_ANSWER;
  
    @Test
    public void testGetPartialSuccess() throws Throwable {
  
target:     Reader mockReader1 = mock(Reader.class);
      Reader mockReader2 = mock(Reader.class);
  
      when(mockResourcePartitionMap.getReader(eq(RESOURCE), eq("1"))).thenReturn(mockReader1);
      when(mockResourcePartitionMap.getReader(eq(RESOURCE), eq("2"))).thenReturn(mockReader2);
      when(mockReader1.getValues(eq(KEYS_PART_1))).thenAnswer(GET_VALUES_ANSWER);
      when(mockReader2.getValues(eq(KEYS_PART_2))).thenAnswer(GET_VALUES_ANSWER);
        
      TerrapinResponse response = serverImpl.get(prepareRequest()).get();
      Map<ByteBuffer, TerrapinSingleResponse> responseMap = response.getResponseMap();
      assertEquals(8, responseMap.size());
  
      // Ensure that the keys arrive correctly.
      checkLookup(KEYS_PART_1, responseMap);
      checkLookup(KEYS_PART_2, responseMap);
    }
  
  }