### Question:
ChaosHostIdentityProvider extends PropertyDefinerBase { String getAwsIdentifier () { AwsMetadataUtil.AwsInstanceIdentity awsInstanceIdentity = getAwsInstanceIdentity(); if (awsInstanceIdentity == null) return null; return Stream.of("aws", awsInstanceIdentity.getInstanceId(), awsInstanceIdentity.getAccountId(), awsInstanceIdentity .getRegion()).filter(Objects::nonNull).filter(not(String::isBlank)).collect(Collectors.joining(":")); }  @Override String getPropertyValue();  }### Answer:
@Test public void getAwsIdentifier () { AwsMetadataUtil.AwsInstanceIdentity identity = mock(AwsMetadataUtil.AwsInstanceIdentity.class); doReturn(identity).when(chaosHostIdentityProvider).getAwsInstanceIdentity(); doReturn("i-123456abcdef").when(identity).getInstanceId(); doReturn("012345678901").when(identity).getAccountId(); doReturn("us-west-2").when(identity).getRegion(); assertEquals("aws:i-123456abcdef:012345678901:us-west-2", chaosHostIdentityProvider.getAwsIdentifier()); }