@Test(expectedExceptions = ValidationException.class, expectedExceptionsMessageRegExp = ".*Transform Request must include a value for required outputStreamRefs.*", dataProvider = "missingOutputStreamRefsProvider") public void testMissingOutputStreamRefs(List<String> outputStreamRefs) { TransformRequest transformRequest = createTransform(CUSTOMER_ID); OutputFileResource outputFileResource = new OutputFileResource(); outputFileResource.setUrl("http: outputFileResource.setType("video"); outputFileResource.setOutputStreamRefs(outputStreamRefs); transformRequest.setOutputs(Collections.singletonList(outputFileResource)); validator.validatePOST(createRequest(transformRequest)); }
@Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); } }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  @Override void validatePOST(DataObjectRequest<TransformRequest> request); void setJsonHelper(JsonHelper jsonHelper); }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  @Override void validatePOST(DataObjectRequest<TransformRequest> request); void setJsonHelper(JsonHelper jsonHelper);  }