AbstractSubutaiHost implements Host { @Override public boolean equals( final Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } final AbstractSubutaiHost that = ( AbstractSubutaiHost ) o; return getId().equals( that.getId() ); } protected  AbstractSubutaiHost( final String peerId, final String hostId, final String hostname,
                                   HostArchitecture architecture ); protected  AbstractSubutaiHost( final String peerId, final HostInfo hostInfo ); protected  AbstractSubutaiHost(); void init(); @Override Peer getPeer(); void setPeer( Peer peer ); @Override CommandResult execute( final RequestBuilder requestBuilder ); @Override CommandResult execute( final RequestBuilder requestBuilder, final CommandCallback callback ); @Override void executeAsync( final RequestBuilder requestBuilder ); @Override void executeAsync( final RequestBuilder requestBuilder, final CommandCallback callback ); @Override String getId(); @Override String getPeerId(); @Override String getHostname(); void updateHostInfo( final HostInfo hostInfo ); long getLastHeartbeat(); @Override HostArchitecture getArch(); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString(); @Override int compareTo( final HostInfo o );  }
@Test public void testEquals() throws Exception { HostImpl host1 = new HostImpl( PEER_ID, hostInfo ); assertEquals( host1, host ); host1 = null; assertFalse( host.equals( host1 ) ); }