public String stringify(boolean value) {
    throw new UnsupportedOperationException(
        "stringify(boolean) was called on a non-boolean stringifier: " + toString());
  }
@Test
  public void testIntervalStringifier() {
    PrimitiveStringifier stringifier = INTERVAL_STRINGIFIER;

    assertEquals("null", stringifier.stringify(null));

    assertEquals("<INVALID>", stringifier.stringify(Binary.EMPTY));
    assertEquals(
        "<INVALID>",
        stringifier.stringify(Binary.fromConstantByteArray(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})));
    assertEquals("<INVALID>", stringifier.stringify(Binary.fromReusedByteArray(new byte[] {
      1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
    })));

    ByteBuffer buffer = ByteBuffer.allocate(12);
    assertEquals(
        "interval(0 months, 0 days, 0 millis)", stringifier.stringify(Binary.fromConstantByteBuffer(buffer)));

    buffer.putInt(0x03000000);
    buffer.putInt(0x06000000);
    buffer.putInt(0x09000000);
    buffer.flip();
    assertEquals(
        "interval(3 months, 6 days, 9 millis)", stringifier.stringify(Binary.fromConstantByteBuffer(buffer)));

    buffer.clear();
    buffer.putInt(0xFFFFFFFF);
    buffer.putInt(0xFEFFFFFF);
    buffer.putInt(0xFDFFFFFF);
    buffer.flip();
    assertEquals(
        "interval(4294967295 months, 4294967294 days, 4294967293 millis)",
        stringifier.stringify(Binary.fromReusedByteBuffer(buffer)));

    checkThrowingUnsupportedException(stringifier, Binary.class);
  }