### Question:
GatekeeperAWSInstance { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("Instance ID", instanceId) .add("Application", application) .add("Name", name) .add("IP Address", ip) .add("SSM Status", ssmStatus) .add("Platform", platform) .toString(); } GatekeeperAWSInstance(String instanceId, String application, String name, String ip, String platform); String getInstanceId(); String getApplication(); String getName(); String getIp(); String getSsmStatus(); String getPlatform(); GatekeeperAWSInstance setSsmStatus(String ssmStatus); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testToString(){ String instanceId = "i-h3110"; String application = "TST"; String name = "TSTBOX"; String ip = "123.4.5.6"; String ssmStatus = "Unknown"; String platform = "Linux"; GatekeeperAWSInstance awsInstance1 = new GatekeeperAWSInstance(instanceId, application, name, ip, platform); String expStr = MoreObjects.toStringHelper(GatekeeperAWSInstance.class) .add("Instance ID", instanceId) .add("Application", application) .add("Name", name) .add("IP Address", ip) .add("SSM Status", ssmStatus) .add("Platform", platform) .toString(); Assert.assertEquals("Test toString()", expStr, awsInstance1.toString()); }