@Test
public void testValidateEmrClusterDefinitionConfigurationMasterMaxSearchPriceSpecifiedAndOnDemandThresholdNegative()
{

    EmrClusterDefinition emrClusterDefinition = createValidEmrClusterDefinition();
    emrClusterDefinition.getInstanceDefinitions().getMasterInstances().setInstanceMaxSearchPrice(BigDecimal.ONE);
    emrClusterDefinition.getInstanceDefinitions().getMasterInstances().setInstanceOnDemandThreshold(BigDecimal.ONE.negate());
    try
    {
        emrClusterDefinitionHelper.validateEmrClusterDefinitionConfiguration(emrClusterDefinition);
        fail("expected IllegalArgumentException, but no exception was thrown");
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("Master instance on-demand threshold must be greater than 0", e.getMessage());
    }
}