@Test
  public void testAllOperationsValidatingResult1() {
    DiskId did = getDiskId();
    for (int i = -16777215; i < 16777215; i++) {
      boolean boolValuePerIteration = false;
      did.setOplogId(i);
      // set true for even, set false for odd
      switch ((i % 3)) {
        case 0:
          boolValuePerIteration = true;
          break;
        case 1:
        case 2:
          boolValuePerIteration = false;
          break;
      }
      byte userbits = 0;
      switch (i % 4) {
        case 0:
          break;
        case 1:
          did.setUserBits(EntryBits.setSerialized(userbits, boolValuePerIteration));
          break;
        case 2:
          did.setUserBits(EntryBits.setInvalid(userbits, boolValuePerIteration));
          break;
        case 3:
          did.setUserBits(EntryBits.setLocalInvalid(userbits, boolValuePerIteration));
          break;
      }
      assertEquals(did.getOplogId(), i);
      byte userBits2 = did.getUserBits();
      switch (i % 4) {
        case 0:
          break;
        case 1:
          assertEquals(EntryBits.isSerialized(userBits2), boolValuePerIteration);
          break;
        case 2:
          assertEquals(EntryBits.isInvalid(userBits2), boolValuePerIteration);
          break;
        case 3:
          assertEquals(EntryBits.isLocalInvalid(userBits2), boolValuePerIteration);
          break;
      }
    }
  }
Test the whether setting of one set of values does not affect another set of values
geode-core/src/test/java/org/apache/geode/internal/cache/DiskIdJUnitTest.java