@Override
    public void getErrors(ErrorCollection errors, String parentLocation) {
        String location = getLocation(parentLocation);
        super.getErrors(errors, parentLocation);
        errors.checkMissing(location, "source", source);
    }
@Test
    public void shouldDeserializeFromAPILikeObject() {
        String json = """
                {
                      "source": "test",
                      "destination": "res1",
                      "type": "test"
                    }""";
        CRArtifact deserializedValue = gson.fromJson(json,CRArtifact.class);
        CRBuiltInArtifact crBuiltInArtifact = (CRBuiltInArtifact) deserializedValue;
        assertThat(crBuiltInArtifact.getSource(),is("test"));
        assertThat(crBuiltInArtifact.getDestination(),is("res1"));
        assertThat(crBuiltInArtifact.getType(),is(CRArtifactType.test));

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