@Test
public void testGetPartitionKeyGroups()
{

    PartitionKeyGroupKeys partitionKeyGroupKeys =
        new PartitionKeyGroupKeys(Arrays.asList(new PartitionKeyGroupKey(PARTITION_KEY_GROUP), new PartitionKeyGroupKey(PARTITION_KEY_GROUP_2)));
    when(partitionKeyGroupService.getPartitionKeyGroups()).thenReturn(partitionKeyGroupKeys);
    // Get the list of partition key groups.
    PartitionKeyGroupKeys resultPartitionKeyGroupKeys = partitionKeyGroupRestController.getPartitionKeyGroups();
    // Validate the returned object.
    assertTrue(resultPartitionKeyGroupKeys.getPartitionKeyGroupKeys().size() >= 2);
    assertTrue(resultPartitionKeyGroupKeys.getPartitionKeyGroupKeys()
        .contains(partitionKeyGroupServiceTestHelper.createPartitionKeyGroupKey(PARTITION_KEY_GROUP)));
    assertTrue(resultPartitionKeyGroupKeys.getPartitionKeyGroupKeys()
        .contains(partitionKeyGroupServiceTestHelper.createPartitionKeyGroupKey(PARTITION_KEY_GROUP_2)));
    // Verify the external calls.
    verify(partitionKeyGroupService).getPartitionKeyGroups();
    verifyNoMoreInteractions(partitionKeyGroupService);
    // Validate the returned object.
    assertEquals(partitionKeyGroupKeys, resultPartitionKeyGroupKeys);
}