ContainerHostInfoModel extends HostInfoModel implements ContainerHostInfo { @Override public int compareTo( final HostInfo o ) { if ( hostname != null && o != null ) { return hostname.compareTo( o.getHostname() ); } return -1; } ContainerHostInfoModel( @JsonProperty( "id" ) final String id,
                                   @JsonProperty( "hostname" ) final String hostname,
                                   @JsonProperty( "containerName" ) final String containerName,
                                   @JsonProperty( "interfaces" ) final HostInterfaces hostInterfaces,
                                   @JsonProperty( "arch" ) final HostArchitecture hostArchitecture,
                                   @JsonProperty( "status" ) final ContainerHostState state,
                                   @JsonProperty( "environmentId" ) final String envId,
                                   @JsonProperty( "vlan" ) final Integer vlan );  ContainerHostInfoModel( final ContainerHostInfo info ); @Override Quota getRawQuota(); @Override String getEnvId(); @Override Integer getVlan(); @Override HostInterfaces getHostInterfaces(); void setHostInterfaces( final HostInterfaces hostInterfaces ); @Override ContainerHostState getState(); @Override String getContainerName(); @Override String toString(); @Override int compareTo( final HostInfo o ); @Override boolean equals( final Object o ); @Override int hashCode();  }
@Test public void testCompare() throws Exception { assertEquals( -1, containerHostInfo.compareTo( null ) ); ContainerHostInfo containerHostInfo2 = JsonUtil.fromJson( INFO_JSON, ContainerHostInfoModel.class ); assertEquals( 0, containerHostInfo.compareTo( containerHostInfo2 ) ); }