public static String toJson(SnapshotRef ref) {
    return toJson(ref, false);
  }
@Test
  public void testTagToJsonDefault() {
    String json = "{\"snapshot-id\":1,\"type\":\"tag\"}";
    SnapshotRef ref = SnapshotRef.tagBuilder(1L).build();
    assertThat(SnapshotRefParser.toJson(ref))
        .as("Should be able to serialize default tag")
        .isEqualTo(json);
  }