public static SnapshotRef fromJson(String json) {
    Preconditions.checkArgument(
        json != null && !json.isEmpty(), "Cannot parse snapshot ref from invalid JSON: %s", json);
    return JsonUtil.parse(json, SnapshotRefParser::fromJson);
  }
@Test
  public void testTagFromJsonDefault() {
    String json = "{\"snapshot-id\":1,\"type\":\"tag\"}";
    SnapshotRef ref = SnapshotRef.tagBuilder(1L).build();
    assertThat(SnapshotRefParser.fromJson(json))
        .as("Should be able to deserialize default tag")
        .isEqualTo(ref);
  }