@Override
    public void getErrors(ErrorCollection errors, String parentLocation) {
        String location = this.getLocation(parentLocation);
        errors.checkMissing(location, "spec", spec);
    }
@Test
    public void shouldDeserializeFromAPILikeObject() {
        String json = """
                {
                    "spec": "0 0 22 ? * MON-FRI",
                    "only_on_changes": true
                  }""";
        CRTimer deserializedValue = gson.fromJson(json,CRTimer.class);

        assertThat(deserializedValue.getSpec(),is("0 0 22 ? * MON-FRI"));
        assertThat(deserializedValue.isOnlyOnChanges(),is(true));

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