@@ -0,0 +1,1992 @@
+package com.indeed.proctor.common;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.indeed.proctor.common.model.ConsumableTestDefinition;%0Aimport com.indeed.proctor.common.model.TestDefinition;%0A%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.InputStream;%0A%0A/**%0A * Simple validator to check if the input JSON file is valid format as test definition.%0A */%0Apublic class TestDefinitionValidator %7B%0A    private static final ObjectMapper OBJECT_MAPPER = Serializers.strict();%0A%0A    private TestDefinitionValidator() %7B%0A    %7D%0A%0A    private static boolean isValidTestDefinition(final InputStream stream, final String testName, final String matrixSource) %7B%0A        try %7B%0A            final TestDefinition testDefinition = OBJECT_MAPPER.readValue(stream, TestDefinition.class);%0A            final ConsumableTestDefinition consumableTestDefinition = ProctorUtils.convertToConsumableTestDefinition(testDefinition);%0A            ProctorUtils.verifyInternallyConsistentDefinition(testName, matrixSource, consumableTestDefinition);%0A            return true;%0A        %7D catch (final Throwable e) %7B%0A            System.err.println(%22Error: %22 + e.getMessage());%0A            return false;%0A        %7D%0A    %7D%0A%0A    public static void main(final String%5B%5D args) %7B%0A        if (args.length %3C 3) %7B%0A            System.err.println(%22Usage: java %22 + TestDefinitionValidator.class.getCanonicalName() + %22 %3Ctest_name%3E %3Cmatrix_source%3E %3Ctest_path%3E%22);%0A            System.exit(0);%0A        %7D%0A%0A        final String testName = args%5B0%5D;%0A        final String matrixSource = args%5B1%5D;%0A%0A        InputStream stream = null;%0A        try %7B%0A            stream = %22-%22.equals(args%5B2%5D) ? System.in : new FileInputStream(args%5B2%5D);%0A        %7D catch (final FileNotFoundException e) %7B%0A            System.err.println(%22Error: %22 + e.getMessage());%0A            System.exit(1);%0A        %7D%0A%0A        final boolean result = isValidTestDefinition(stream, testName, matrixSource);%0A        System.exit(result ? 0 : 1);%0A    %7D%0A%7D%0A

Add simple test definition validator