@Test public void testEqualsFalseDiffLink() throws Exception { final Link link1 = mock(Link.class); final Link link2 = mock(Link.class); final ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 0, null, link1, false); final ConnectedAgentAttache agentAttache2 = new ConnectedAgentAttache(null, 0, null, link2, false); assertFalse(agentAttache1.equals(agentAttache2)); }
@Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } if (_link == null) { return false; } final ConnectedAgentAttache that = (ConnectedAgentAttache) obj; return super.equals(obj) && _link == that._link; }
ConnectedAgentAttache extends AgentAttache { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } if (_link == null) { return false; } final ConnectedAgentAttache that = (ConnectedAgentAttache) obj; return super.equals(obj) && _link == that._link; } }
ConnectedAgentAttache extends AgentAttache { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } if (_link == null) { return false; } final ConnectedAgentAttache that = (ConnectedAgentAttache) obj; return super.equals(obj) && _link == that._link; } ConnectedAgentAttache(final AgentManagerImpl agentMgr, final long id, final String name, final Link link, final boolean maintenance); }
ConnectedAgentAttache extends AgentAttache { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } if (_link == null) { return false; } final ConnectedAgentAttache that = (ConnectedAgentAttache) obj; return super.equals(obj) && _link == that._link; } ConnectedAgentAttache(final AgentManagerImpl agentMgr, final long id, final String name, final Link link, final boolean maintenance); @Override synchronized void send(final Request req); @Override boolean equals(final Object obj); @Override void disconnect(final HostStatus state); @Override synchronized boolean isClosed(); @Override int hashCode(); }
ConnectedAgentAttache extends AgentAttache { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } if (_link == null) { return false; } final ConnectedAgentAttache that = (ConnectedAgentAttache) obj; return super.equals(obj) && _link == that._link; } ConnectedAgentAttache(final AgentManagerImpl agentMgr, final long id, final String name, final Link link, final boolean maintenance); @Override synchronized void send(final Request req); @Override boolean equals(final Object obj); @Override void disconnect(final HostStatus state); @Override synchronized boolean isClosed(); @Override int hashCode();  }