@Test
public void testValidateEmrClusterDefinitionConfigurationCoreInstanceSpecifiedInstanceCountNegative()
{

    EmrClusterDefinition emrClusterDefinition = createValidEmrClusterDefinition();
    emrClusterDefinition.getInstanceDefinitions().getCoreInstances().setInstanceCount(-1);
    try
    {
        emrClusterDefinitionHelper.validateEmrClusterDefinitionConfiguration(emrClusterDefinition);
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("At least 0 core instance must be specified.", e.getMessage());
    }
}