### Question:
FactHelper { public static FactRecord withComment(FactRecord fact, String comment) { if (fact == null) return null; if (StringUtils.isBlank(comment)) return fact; return fact.addComment(new FactCommentRecord() .setId(UUID.randomUUID()) .setOriginID(fact.getOriginID()) .setComment(comment) .setTimestamp(System.currentTimeMillis())); }  static FactRecord withComment(FactRecord fact, String comment); static FactRecord withAcl(FactRecord fact, UUID currentUserId, List<UUID> acl);  }### Answer:
@Test public void testWithCommentNullFact() { assertNull(withComment(null, "Hello World!")); }
@Test public void testWithCommentSkipsBlankComment() { assertTrue(CollectionUtils.isEmpty(withComment(new FactRecord(), null).getComments())); assertTrue(CollectionUtils.isEmpty(withComment(new FactRecord(), "").getComments())); assertTrue(CollectionUtils.isEmpty(withComment(new FactRecord(), " ").getComments())); }
@Test public void testWithCommentAddsAdditionalComment() { FactRecord fact = new FactRecord() .setOriginID(UUID.randomUUID()); fact = withComment(fact, "Hello World!"); assertEquals(1, fact.getComments().size()); assertNotNull(fact.getComments().get(0).getId()); assertEquals(fact.getOriginID(), fact.getComments().get(0).getOriginID()); assertEquals("Hello World!", fact.getComments().get(0).getComment()); assertTrue(fact.getComments().get(0).getTimestamp() > 0); }