### Question:
IntentEntry implements Comparable<IntentEntry> { public boolean isAnAcquire(){ return (state.isAcquiring()); } 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 testIsAnAcquire() throws Exception { assertFalse(new IntentEntry(member1, LockMode.UNLOCKED, 0L, 0L).isAnAcquire()); assertFalse(new IntentEntry(member1,LockMode.SHARED,0L,0L).isAnAcquire()); assertFalse(new IntentEntry(member1,LockMode.EXCLUSIVE,0L,0L).isAnAcquire()); assertTrue(new IntentEntry(member1, LockMode.ACQUIRING_SHARED, 0L, 0L).isAnAcquire()); assertTrue(new IntentEntry(member1, LockMode.ACQUIRING_EXCLUSIVE, 0L, 0L).isAnAcquire()); assertTrue(new IntentEntry(member1, LockMode.ACQUIRING_EXCLUSIVE_WITH_SHARE, 0L, 0L).isAnAcquire()); }