InstanceAWSECSProvider extends InstanceAWSProvider { @Override String getInstanceId(AWSAttestationData info, Struct instanceDocument) { String instanceId = info.getTaskid(); if (instanceId == null || instanceId.isEmpty()) { instanceId = instanceDocument.getString(ATTR_INSTANCE_ID); } return instanceId; }  @Override void initialize(String provider, String providerEndpoint, SSLContext sslcontext,
            KeyStore keyStore);  }
@Test public void testGetInstanceId() { InstanceAWSECSProvider provider = new InstanceAWSECSProvider(); provider.initialize("provider", "com.yahoo.athenz.instance.provider.impl.InstanceAWSECSProvider", null, null); AWSAttestationData data = new AWSAttestationData(); data.setTaskid("task1234"); assertEquals(provider.getInstanceId(data, null), "task1234"); data.setTaskid(null); Struct doc = new Struct(); doc.put(InstanceAWSProvider.ATTR_INSTANCE_ID, "data1234"); assertEquals(provider.getInstanceId(data, doc), "data1234"); data.setTaskid(""); assertEquals(provider.getInstanceId(data, doc), "data1234"); data.setTaskid("task1234"); assertEquals(provider.getInstanceId(data, doc), "task1234"); }