### Question:
IntentEntry implements Comparable<IntentEntry> { public boolean isFor(InetSocketAddress myID) { return this.member.equals(myID); } IntentEntry(InetSocketAddress member,LockMode state,long published);  IntentEntry(InetSocketAddress member,LockMode state,long published, long lastUnlockedOrAcquired); boolean isFor(InetSocketAddress myID); boolean isPublishedBefore(IntentEntry someEntry); boolean isPublishedAfter(IntentEntry someEntry); boolean isEnteredBefore(IntentEntry other); boolean isAckedBy(IntentEntry entry); boolean isAnAcquire(); static int tiebreaker(InetSocketAddress addr1, InetSocketAddress addr2); int compareTo(IntentEntry other); String toString(); public InetSocketAddress member; public long published; public long lastUnlockedOrAcquired; public LockMode state; }### Answer:
@Test public void testIsFor() throws Exception { InetSocketAddress member1Copy = new InetSocketAddress("localhost",1111); InetSocketAddress differentHostSamePort = new InetSocketAddress("127.0.0.2",1111); IntentEntry entry = new IntentEntry(member1, LockMode.UNLOCKED,0L,0L); assertTrue(entry.isFor(member1)); assertTrue(entry.isFor(member1Copy)); assertFalse(entry.isFor(member2)); assertFalse(entry.isFor(differentHostSamePort)); }