protected void setUp() throws Exception { super.setUp(); final Thread currentThread = Thread.currentThread(); threadID = System.identityHashCode(currentThread); threadName = currentThread.getName(); request = new ReleaseLockRequest( TEST_LOCK_REGION, toBinary(TEST_LOCK), OWNER_ADDRESS, threadID, threadName, READ_LOCK); request.setSender(OWNER_ADDRESS); }
public void testIsReadLock() { assertEquals(READ_LOCK, request.isReadLock()); }
public void testGetLockRegion() { assertEquals(toBinary(TEST_LOCK), request.getLockKey()); }
public void testGetWireableType() { assertEquals(Wireable.TYPE_RELEASE_LOCK_REQUEST, request.getWireableType()); }
public void testGetLockKey() { assertEquals(TEST_LOCK_REGION, request.getLockRegionName()); }
public void testGetThreadID() { assertEquals(threadID, request.getOwnerThreadID()); }
public void testGetReceiver() { assertFalse(request.isReceiverSet()); }
public void testHashCode() throws IOException, ClassNotFoundException { assertTrue(request.hashCode() != 0); }
public void testToString() throws Exception { assertNotNull(request.toString()); }