### Question:
InputValidator { public static void validateNameNotNull(String className, String actionDescription, String name, String nameParameter ) throws InvalidParameterException { if (name == null) { ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.NULL_NAME.getMessageDefinition(); messageDefinition.setMessageParameters(nameParameter, null); throw new InvalidParameterException(messageDefinition, className, actionDescription, nameParameter, null); } }  static void validateRemoteServerURLNotNull(String className, String actionDescription, String omasServerURL); static void validateRemoteServerNameNotNull(String className, String actionDescription, String omasServerName); static void validateUserIdNotNull(
            String className,
            String actionDescription,
            String userId); static Status validateStatusAndCheckNotDeleted(
            String className,
            String actionDescription,
            String statusName); static void validateGUIDNotNull(
            String className,
            String actionDescription,
            String guid,
            String guidParameter); static void validateNameNotNull(String className,
                                           String actionDescription,
                                           String name,
                                           String nameParameter
                                          ); static void validateNodeType(Object... args);  }### Answer:
@Test public void testNameNotNull() { try { InputValidator.validateNameNotNull("c","m","A1","nameParm"); } catch (InvalidParameterException e) { fail("Non null should not fail"); } try { InputValidator.validateNameNotNull("c","m",null,"nameParm"); } catch (InvalidParameterException e) { System.out.println("Expected error message " + e.getReportedErrorMessageId()); if (e.getReportedErrorMessage().contains("{") || e.getReportedErrorMessage().contains("}") ){ fail("inserts not correct"); } } }