RouterStub stub2=new RouterStub("192.168.1.5", 5001, null, null);
assert stub1.compareTo(stub2) == -1;
}
public void testHashCode() {
RouterStub stub1=new RouterStub("192.168.1.5", 5000, null, null);
RouterStub stub2=new RouterStub("192.168.1.5", 5001, null, null);
RouterStub stub3=new RouterStub("192.168.1.4", 5000, null, null);
RouterStub stub4=new RouterStub("192.168.1.5", 5000, null, null);
Map<RouterStub,Integer> stubs=new HashMap<RouterStub,Integer>();
stubs.put(stub1, 1);
stubs.put(stub2, 2);
stubs.put(stub3, 3);