@Test
public void testGetEmrClusterDefinitionEntity()
{

    // Create a namespace entity.
    NamespaceEntity namespaceEntity = new NamespaceEntity();
    // Create an EMR cluster definition entity.
    EmrClusterDefinitionEntity emrClusterDefinitionEntity = new EmrClusterDefinitionEntity();
    // Create an EMR cluster definition key.
    EmrClusterDefinitionKey emrClusterDefinitionKey = new EmrClusterDefinitionKey(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME);
    // Mock the external calls.
    when(namespaceDao.getNamespaceByCd(NAMESPACE)).thenReturn(namespaceEntity);
    when(emrClusterDefinitionDao.getEmrClusterDefinitionByNamespaceAndName(namespaceEntity, EMR_CLUSTER_DEFINITION_NAME))
        .thenReturn(emrClusterDefinitionEntity);
    // Call the method under test.
    EmrClusterDefinitionEntity result = emrClusterDefinitionDaoHelper.getEmrClusterDefinitionEntity(emrClusterDefinitionKey);
    // Verify the external calls.
    verify(namespaceDao).getNamespaceByCd(NAMESPACE);
    verify(emrClusterDefinitionDao).getEmrClusterDefinitionByNamespaceAndName(namespaceEntity, EMR_CLUSTER_DEFINITION_NAME);
    verifyNoMoreInteractionsHelper();
    // Validate the result.
    assertEquals(emrClusterDefinitionEntity, result);
}