private void doTestOffset(ZoneOffset offset, int hours, int minutes, int seconds) {

    assertEquals(offset.getTotalSeconds(), hours * 60 * 60 + minutes * 60 + seconds);
    final String id;
    if (hours == 0 && minutes == 0 && seconds == 0) {
      id = "Z";
    } else {
      String str = (hours < 0 || minutes < 0 || seconds < 0) ? "-" : "+";
      str += Integer.toString(Math.abs(hours) + 100).substring(1);
      str += ":";
      str += Integer.toString(Math.abs(minutes) + 100).substring(1);
      if (seconds != 0) {
        str += ":";
        str += Integer.toString(Math.abs(seconds) + 100).substring(1);
      }
      id = str;
    }
    assertEquals(offset.getId(), id);
    assertEquals(offset, ZoneOffset.ofHoursMinutesSeconds(hours, minutes, seconds));
    if (seconds == 0) {
      assertEquals(offset, ZoneOffset.ofHoursMinutes(hours, minutes));
      if (minutes == 0) {
        assertEquals(offset, ZoneOffset.ofHours(hours));
      }
    }
    assertEquals(ZoneOffset.of(id), offset);
    assertEquals(offset.toString(), id);
  }