@Override
  public boolean equals(Object obj) {
    if (obj instanceof Mode) {
      Mode that = (Mode) obj;
      return mOwnerBits == that.mOwnerBits && mGroupBits == that.mGroupBits
          && mOtherBits == that.mOtherBits;
    }
    return false;
  }
@Test
  public void equals() {
    Mode allAccess = new Mode((short) 0777);
    assertTrue(allAccess.equals(Mode.defaults()));
    Mode noAccess = new Mode((short) 0000);
    assertTrue(noAccess.equals(Mode.createNoAccess()));
    assertFalse(allAccess.equals(noAccess));
  }