HistoryOverview { public String getEnd() { if ((historyEntry == null) || (historyEntry.getEnd() == null)) { return StringUtils.EMPTY; } return format.format(historyEntry.getEnd()); }  @PostConstruct void init(); HistoryEntry getHistory(); String getStart(); String getEnd(); String getDuration(); DonutData getDonutData();  }
@Test public void getEnd() { HistoryEntryImpl entry = new HistoryEntryImpl(); Date now = new Date(); entry.setEnd(now); when(historyUtil.readHistoryEntry(historyResource)).thenReturn(entry); overview.init(); String end = overview.getEnd(); assertNotNull(end); }