ParserUtil { public static void generateExceptionRequiredField(final String nodeName, final String fieldName) throws APIRestGeneratorException { final String errorString = "The field name '" + fieldName + "' is required in the node: " + nodeName; ParserUtil.LOGGER.error(errorString); throw new APIRestGeneratorException(errorString); } private  ParserUtil(); static String validateExtension(final String filePath); static JsonNode deserializeIntoJson(final String filePath); static String readFileContent(final String filePath); static Set<String> generateSetStringFromString(final ArrayNode arrayNode); static JsonNode getNodeValueJson(final String nodeName, final JsonNode node, final String fieldName, final boolean isRequired); static String getNodeValueField(final String nodeName, final JsonNode node, final String fieldName, final boolean isRequired); static Set<String> getNodeValueSetField(final String nodeName,
                                                   final JsonNode node,
                                                   final String fieldName,
                                                   final boolean isRequired); static void generateExceptionRequiredField(final String nodeName, final String fieldName); static String generateToStringFromSetString(final Set<String> listString); static IParser getSchemasParser(final GenerationParameters generationParameters);  }
@Test(expected = APIRestGeneratorException.class) public void generateExceptionRequiredField() throws APIRestGeneratorException { ParserUtil.generateExceptionRequiredField(ConstantsTest.NODE_NAME, ConstantsTest.FIELD_NAME) ; }