HistoryDataItem { public String getDate() { if (history.getStart() != null) { return format.format(history.getStart()); } if (history.getEnd() != null) { return format.format(history.getEnd()); } return StringUtils.EMPTY; }  @PostConstruct void setup(); String getDate(); String getDuration(); String getStatusIcon(); String getStatusColor(); String getPath(); int getScriptCount();  }
@Test public void getDate_start() { when(history.getStart()).thenReturn(new Date()); String date = item.getDate(); assertTrue(StringUtils.isNotBlank(date)); }
@Test public void getDate_end() { when(history.getEnd()).thenReturn(new Date()); String date = item.getDate(); assertTrue(StringUtils.isNotBlank(date)); }