UserBulkUploadRequestValidator { public static void validateUserBulkUploadRequest(Map<String, Object> userMap) { validateUserType(userMap); validateOrganisationId(userMap); } private  UserBulkUploadRequestValidator(); static void validateUserBulkUploadRequest(Map<String, Object> userMap); static void validateUserType(Map<String, Object> userMap); static void validateOrganisationId(Map<String, Object> userMap);  }
@Test public void testValidateUserTypeWithMissingUserTypeParam() { Map<String, Object> userMap = new HashMap<>(); try { userMap.put(JsonKey.USER_TYPE, "invalid"); UserBulkUploadRequestValidator.validateUserBulkUploadRequest(userMap); } catch (Exception e) { Assert.assertEquals("Invalid userType: invalid. Valid values are: [TEACHER, OTHER].", e.getMessage()); } }