@Test
public void testGetEmrClusterDefinitions() throws Exception
{

    // Create an EMR cluster definition keys.
    EmrClusterDefinitionKeys emrClusterDefinitionKeys =
        new EmrClusterDefinitionKeys(Arrays.asList(new EmrClusterDefinitionKey(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME)));
    // Mock the external calls.
    when(emrClusterDefinitionService.getEmrClusterDefinitions(NAMESPACE)).thenReturn(emrClusterDefinitionKeys);
    // Call the method under test.
    EmrClusterDefinitionKeys result = emrClusterDefinitionRestController.getEmrClusterDefinitions(NAMESPACE);
    // Verify the external calls.
    verify(emrClusterDefinitionService).getEmrClusterDefinitions(NAMESPACE);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(emrClusterDefinitionKeys, result);
}