}
@Test
public void testAsgInstances() throws Exception {
AutoScalingGroup autoScalingGroup = new AutoScalingGroup("Conforming", VPC_INSTANCE_ID);
Cluster conformingCluster = new Cluster("Conforming", REGION, autoScalingGroup);
Conformity result = instanceInVPC.check(conformingCluster);
Assert.assertNotNull(result);
Assert.assertEquals(result.getRuleId(), instanceInVPC.getName());
Assert.assertEquals(result.getFailedComponents().size(), 0);
autoScalingGroup = new AutoScalingGroup("NonConforming", INSTANCE_ID);
Cluster nonConformingCluster = new Cluster("NonConforming", REGION, autoScalingGroup);
result = instanceInVPC.check(nonConformingCluster);
Assert.assertNotNull(result);
Assert.assertEquals(result.getRuleId(), instanceInVPC.getName());
Assert.assertEquals(result.getFailedComponents().size(), 1);
Assert.assertEquals(result.getFailedComponents().iterator().next(), INSTANCE_ID);