ResourceHostInfoModel extends HostInfoModel implements ResourceHostInfo { @Override public String toString() { return MoreObjects.toStringHelper( this ).add( "id", id ).add( "hostname", hostname ) .add( "instance", instance ).add( "containers", containers ).toString(); } ResourceHostInfoModel( final ResourceHostInfo resourceHostInfo ); long getDateCreated(); void setDateCreated( final long dateCreated ); @Override String getAddress(); @Override String getId(); @Override String getHostname(); @Override @JsonIgnore InstanceType getInstanceType(); @JsonIgnore Set<Alert> getAlerts(); @JsonIgnore @Override Set<ContainerHostInfo> getContainers(); @Override String toString(); @Override int compareTo( final HostInfo o ); @Override boolean equals( final Object o ); @Override int hashCode();  }
@Test public void testToString() throws Exception { String toString = resourceHostInfo.toString(); assertThat( toString, containsString( HOST_HOSTNAME ) ); assertThat( toString, containsString( HOST_ID ) ); assertThat( toString, containsString( CONTAINER_HOSTNAME ) ); assertThat( toString, containsString( CONTAINER_IP ) ); assertThat( toString, containsString( CONTAINER_ID ) ); assertThat( toString, containsString( CONTAINER_STATUS.name() ) ); assertThat( toString, containsString( ARCH.name() ) ); }