DataModelFactory { public static Comment createComment(final String entityId, final String entityType, final String action, final String commentedText, final String user, final Date date) { final Comment comment = new Comment(); comment.setEntityId(entityId); comment.setEntityType(entityType); comment.setAction(action); comment.setCommentText(commentedText); comment.setCommentedBy(user); comment.setCreatedDateTime(date); return comment; } private  DataModelFactory(); static Organization createOrganization(final String name); static Module createModule(final String name,final String version); static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension); static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension, final String origin); static License createLicense(final String name, final String longName, final String comments, final String regexp, final String url); static Dependency createDependency(final Artifact artifact, final Scope scope); static Dependency createDependency(final Artifact artifact, final String scope); static PromotionDetails createPromotionDetails(final Boolean canBePromoted, final Boolean isSnapshot, final List<String> unPromotedDependencies, final List<Artifact> doNotUseArtifacts); static Delivery createDelivery(final String commercialName, final String commercialVersion, final String releaseDate, final List<String> dependencies); static ArtifactPromotionStatus createArtifactPromotionStatus(final Boolean promoted, final String message); static ArtifactQuery createArtifactQuery(final String user, final int stage , final String name, final String sha256, final String type, final String location); static Comment createComment(final String entityId,
										final String entityType,
										final String action,
										final String commentedText,
										final String user,
										final Date date);  }
@Test public void createComment() throws UnsupportedScopeException { Comment comment = DataModelFactory.createComment("com.axway.test:1.0.0::jar", "DbArtifact", "Flag as DO_NOT_USE", "test comment", "testUser", new Date()); assertNotNull(comment); assertEquals("com.axway.test:1.0.0::jar", comment.getEntityId()); assertEquals("DbArtifact", comment.getEntityType()); assertEquals("test comment", comment.getCommentText()); assertEquals("testUser", comment.getCommentedBy()); assertEquals("Flag as DO_NOT_USE", comment.getAction()); }