@Test
public void testOverrideEmrClusterDefinition()
{

    EmrClusterDefinition emrClusterDefinition =
        new EmrClusterDefinition("sshKeyPairName", "subnetId", "logBucket", true, true, true, true, "accountId", "serviceIamRole", "ec2NodeIamProfileName",
            "amiVersion", "releaseLabel", "hadoopVersion", "hiveVersion", "pigVersion", true, Lists.newArrayList(new ScriptDefinition()),
            Lists.newArrayList(new ScriptDefinition()), "additionalInfo", new InstanceDefinitions(), 0,
            Lists.newArrayList(new EmrClusterDefinitionInstanceFleet()), Lists.newArrayList(new NodeTag()), "supportedProduct",
            Lists.newArrayList(new EmrClusterDefinitionApplication()), Lists.newArrayList(new EmrClusterDefinitionConfiguration()),
            Lists.newArrayList(new Parameter()), Lists.newArrayList(new Byte("0")), Lists.newArrayList(new HadoopJarStep()),
            Lists.newArrayList("additionalMasterSecurityGroups"), Lists.newArrayList("additionalSlaveSecurityGroups"), "securityConfiguration",
            "masterSecurityGroup", "slaveSecurityGroup", "serviceAccessSecurityGroup", "scaleDownBehavior", new EmrClusterDefinitionKerberosAttributes(),
            1);
    EmrClusterDefinition emrClusterDefinitionOverride =
        new EmrClusterDefinition("sshKeyPairNameOverride", "subnetIdOverride", "logBucketOverride", false, false, false, false, "accountIdOverride",
            "serviceIamRoleOverride", "ec2NodeIamProfileNameOverride", "amiVersionOverride", "releaseLabelOverride", "hadoopVersionOverride",
            "hiveVersionOverride", "pigVersionOverride", false, Lists.newArrayList(new ScriptDefinition(), new ScriptDefinition()),
            Lists.newArrayList(new ScriptDefinition(), new ScriptDefinition()), "additionalInfoOverride", new InstanceDefinitions(), 10,
            Lists.newArrayList(new EmrClusterDefinitionInstanceFleet(), new EmrClusterDefinitionInstanceFleet()),
            Lists.newArrayList(new NodeTag(), new NodeTag()), "supportedProductOverride",
            Lists.newArrayList(new EmrClusterDefinitionApplication(), new EmrClusterDefinitionApplication()),
            Lists.newArrayList(new EmrClusterDefinitionConfiguration(), new EmrClusterDefinitionConfiguration()),
            Lists.newArrayList(new Parameter(), new Parameter()), Lists.newArrayList(new Byte("0"), new Byte("0")),
            Lists.newArrayList(new HadoopJarStep(), new HadoopJarStep()),
            Lists.newArrayList("additionalMasterSecurityGroupsOverride", "additionalMasterSecurityGroupsOverride"),
            Lists.newArrayList("additionalSlaveSecurityGroupsOverride", "additionalSlaveSecurityGroupsOverride"), "securityConfigurationOverride",
            "masterSecurityGroupOverride", "slaveSecurityGroupOverride", "serviceSecurityGroupOverride", "scaleDownBehaviorOverride",
            new EmrClusterDefinitionKerberosAttributes(), 1);
    // Call the method under test.
    emrHelperServiceImpl.overrideEmrClusterDefinition(emrClusterDefinition, emrClusterDefinitionOverride);
    // Validate the override
    assertThat("Did not override.", emrClusterDefinition, is(emrClusterDefinitionOverride));
}