@Test
public void testUnreference() throws ClosedChannelException {

  CloseableReferenceCount clr = new CloseableReferenceCount();
  clr.reference();
  clr.reference();
  assertFalse("New reference count should not equal STATUS_CLOSED_MASK",
      clr.unreference());
  assertEquals("Incorrect reference count", 1, clr.getReferenceCount());
}