@Test
public void testCreatePartitionKeyGroup()
{

    // Create a partition key group.
    PartitionKeyGroup partitionKeyGroup = new PartitionKeyGroup(new PartitionKeyGroupKey(PARTITION_KEY_GROUP));
    PartitionKeyGroupCreateRequest request = partitionKeyGroupServiceTestHelper.createPartitionKeyGroupCreateRequest(PARTITION_KEY_GROUP);
    when(partitionKeyGroupService.createPartitionKeyGroup(request)).thenReturn(partitionKeyGroup);
    PartitionKeyGroup resultPartitionKeyGroup = partitionKeyGroupRestController.createPartitionKeyGroup(request);
    // Validate the returned object.
    partitionKeyGroupServiceTestHelper.validatePartitionKeyGroup(PARTITION_KEY_GROUP, resultPartitionKeyGroup);
    // Verify the external calls.
    verify(partitionKeyGroupService).createPartitionKeyGroup(request);
    verifyNoMoreInteractions(partitionKeyGroupService);
    // Validate the returned object.
    assertEquals(partitionKeyGroup, resultPartitionKeyGroup);
}