DateTimeAgent extends AbstractAgent { protected String getDay(Date date) { String[] weekdays = new DateFormatSymbols(Locale.ENGLISH).getWeekdays(); Calendar cal = Calendar.getInstance(); cal.setTime(date); int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); return weekdays[dayOfWeek]; } DateTimeAgent(); @Override AgentResponse process(AgentRequest request);  }
@Test public void testGetDay() { assertEquals("Friday", agent.getDay(testDate)); }