WorldpayCurrentTimeAppender implements WorldpaySupportEmailAppender { @Override public String appendContent() { final StringBuilder currentTime = new StringBuilder(); final LocalDateTime dateTime = LocalDateTime.now(); final DateTimeFormatter fmt = DateTimeFormatter.ofPattern("EEEE d MMMM, H:mm:ss, zzzz (z)").withZone(ZoneId.systemDefault()); currentTime.append(System.lineSeparator()).append("Time: "); currentTime.append(ONE_TAB).append(dateTime.format(fmt)).append(System.lineSeparator()); return currentTime.toString(); }  @Override String appendContent();  }
@Test public void testAppendContent() throws Exception { final String result = testObj.appendContent(); assertTrue(result.contains("Time: ")); }