@Override
    public void getErrors(ErrorCollection errors, String parentLocation) {
        String location = getLocation(parentLocation);
        errors.checkMissing(location, "link", link);
        errors.checkMissing(location, "regex", regex);
        validateLink(errors, location);
    }
@Test
    public void shouldDeserializeFromAPILikeObject() {
        String json = """
                {
                    "link": "https://github.com/gocd/api.go.cd/issues/${ID}",
                    "regex": "##(d+)"
                  }""";
        CRTrackingTool deserializedValue = gson.fromJson(json,CRTrackingTool.class);

        assertThat(deserializedValue.getLink(),is("https://github.com/gocd/api.go.cd/issues/${ID}"));
        assertThat(deserializedValue.getRegex(),is("##(d+)"));

        ErrorCollection errors = deserializedValue.getErrors();
        assertTrue(errors.isEmpty());
    }