@Test
public void testGetEmrClusterDefinitionEntityNamespaceNoExists()
{

    // Create an EMR cluster definition key.
    EmrClusterDefinitionKey emrClusterDefinitionKey = new EmrClusterDefinitionKey(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME);
    // Mock the external calls.
    when(namespaceDao.getNamespaceByCd(NAMESPACE)).thenReturn(null);
    // Try to call the method under test.
    try
    {
        emrClusterDefinitionDaoHelper.getEmrClusterDefinitionEntity(emrClusterDefinitionKey);
        fail();
    }
    catch (ObjectNotFoundException e)
    {
        assertEquals(String.format("EMR cluster definition with name \"%s\" doesn't exist for namespace \"%s\".", EMR_CLUSTER_DEFINITION_NAME, NAMESPACE),
            e.getMessage());
    }
    // Verify the external calls.
    verify(namespaceDao).getNamespaceByCd(NAMESPACE);
    verifyNoMoreInteractionsHelper();
}