@Test
public void testGetExpectedPartitionValues()
{

    PartitionKeyGroupKey partitionKeyGroupKey = new PartitionKeyGroupKey();
    partitionKeyGroupKey.setPartitionKeyGroupName(PARTITION_KEY_GROUP);
    List<String> testSortedExpectedPartitionValues = expectedPartitionValueDaoTestHelper.getTestSortedExpectedPartitionValues();
    int startExpectedPartitionValueIndex = 1;
    int endExpectedPartitionValueIndex = testSortedExpectedPartitionValues.size() - 2;
    PartitionValueRange partitionValueRange = new PartitionValueRange();
    partitionValueRange.setStartPartitionValue(testSortedExpectedPartitionValues.get(startExpectedPartitionValueIndex));
    partitionValueRange.setEndPartitionValue(testSortedExpectedPartitionValues.get(endExpectedPartitionValueIndex));
    ExpectedPartitionValuesInformation expectedPartitionValuesInformation =
        new ExpectedPartitionValuesInformation(partitionKeyGroupServiceTestHelper.createPartitionKeyGroupKey(PARTITION_KEY_GROUP),
            expectedPartitionValueDaoTestHelper.getTestSortedExpectedPartitionValues()
                .subList(startExpectedPartitionValueIndex, endExpectedPartitionValueIndex));
    when(expectedPartitionValueService.getExpectedPartitionValues(partitionKeyGroupKey, partitionValueRange))
        .thenReturn(expectedPartitionValuesInformation);
    ExpectedPartitionValuesInformation resultPartitionValuesInformation = expectedPartitionValueRestController
        .getExpectedPartitionValues(PARTITION_KEY_GROUP, testSortedExpectedPartitionValues.get(startExpectedPartitionValueIndex),
            testSortedExpectedPartitionValues.get(endExpectedPartitionValueIndex));
    // Validate the returned object.
    expectedPartitionValueServiceTestHelper.validateExpectedPartitionValuesInformation(PARTITION_KEY_GROUP,
        testSortedExpectedPartitionValues.subList(startExpectedPartitionValueIndex, endExpectedPartitionValueIndex), resultPartitionValuesInformation);
    // Verify the external calls.
    verify(expectedPartitionValueService).getExpectedPartitionValues(partitionKeyGroupKey, partitionValueRange);
    verifyNoMoreInteractions(expectedPartitionValueService);
    // Validate the returned object.
    assertEquals(expectedPartitionValuesInformation, resultPartitionValuesInformation);
}