BatchContextParameters { public DateTime getToIssueDate() { String toIssueDate = getIssueDate(TO_ISSUE_DATE); return DateTime.valueOf(toIssueDate + "235959", Format.SIMPLE); }  DateTime getFromIssueDate(); DateTime getToIssueDate(); static final String FROM_ISSUE_DATE; static final String TO_ISSUE_DATE; }
@Test public void testToIssueDate() { environment.setBatchArg(BatchContextParameters.TO_ISSUE_DATE, "20111130"); environment.reload(); DateTime actual = parameters.getToIssueDate(); assertThat(actual.getYear(), is(equalTo(2011))); assertThat(actual.getMonth(), is(equalTo(11))); assertThat(actual.getDay(), is(equalTo(30))); assertThat(actual.getHour(), is(equalTo(23))); assertThat(actual.getMinute(), is(equalTo(59))); assertThat(actual.getSecond(), is(equalTo(59))); }