@Override
    public void getErrors(ErrorCollection errors, String parentLocation) {
        String location = this.getLocation(parentLocation);
        errors.checkMissing(location, "type", type);
    }
@Test
    public void shouldAppendPrettyLocationInErrors() {
        CRApproval a = new CRApproval();

        ErrorCollection errors = new ErrorCollection();
        a.getErrors(errors, "Pipeline abc");

        String fullError = errors.getErrorsAsText();

        assertThat(fullError).contains("Pipeline abc; Approval");
        assertThat(fullError).contains("Missing field 'type'.");
    }