@Test public void testshouldExtractSchoolYear() { Map<String, Object> gradeBody = new HashMap<String, Object>(); gradeBody.put(ParameterConstants.SCHOOL_YEAR, "2009-2010"); Entity grade = new MongoEntity(EntityNames.GRADE, gradeBody); Assert.assertTrue(simpleExtractVerifier.shouldExtract(grade, DateTime.parse("2011-05-23", DateHelper.getDateTimeFormat()))); Assert.assertTrue(simpleExtractVerifier.shouldExtract(grade, DateTime.parse("2010-05-23", DateHelper.getDateTimeFormat()))); Assert.assertTrue(simpleExtractVerifier.shouldExtract(grade, null)); Assert.assertFalse(simpleExtractVerifier.shouldExtract(grade, DateTime.parse("2009-05-24", DateHelper.getDateTimeFormat()))); Assert.assertFalse(simpleExtractVerifier.shouldExtract(grade, DateTime.parse("2008-05-24", DateHelper.getDateTimeFormat()))); }
@Override public boolean shouldExtract(Entity entity, DateTime upToDate) { String entityDate = EntityDateHelper.retrieveDate(entity); return EntityDateHelper.isPastOrCurrentDate(entityDate, upToDate, entity.getType()); }
SimpleExtractVerifier implements ExtractVerifier { @Override public boolean shouldExtract(Entity entity, DateTime upToDate) { String entityDate = EntityDateHelper.retrieveDate(entity); return EntityDateHelper.isPastOrCurrentDate(entityDate, upToDate, entity.getType()); } }
SimpleExtractVerifier implements ExtractVerifier { @Override public boolean shouldExtract(Entity entity, DateTime upToDate) { String entityDate = EntityDateHelper.retrieveDate(entity); return EntityDateHelper.isPastOrCurrentDate(entityDate, upToDate, entity.getType()); }  }
SimpleExtractVerifier implements ExtractVerifier { @Override public boolean shouldExtract(Entity entity, DateTime upToDate) { String entityDate = EntityDateHelper.retrieveDate(entity); return EntityDateHelper.isPastOrCurrentDate(entityDate, upToDate, entity.getType()); }  @Override boolean shouldExtract(Entity entity, DateTime upToDate); }
SimpleExtractVerifier implements ExtractVerifier { @Override public boolean shouldExtract(Entity entity, DateTime upToDate) { String entityDate = EntityDateHelper.retrieveDate(entity); return EntityDateHelper.isPastOrCurrentDate(entityDate, upToDate, entity.getType()); }  @Override boolean shouldExtract(Entity entity, DateTime upToDate);  }