### Question:
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);  }### Answer:
@Test public void testShouldExtract() { Map<String, Object> body = new HashMap<String, Object>(); body.put(ParameterConstants.BEGIN_DATE, "01-01-01"); Entity studentProgramAssociation = new MongoEntity(EntityNames.STUDENT_PROGRAM_ASSOCIATION, body); Assert.assertTrue( "01-01-01",simpleExtractVerifier.shouldExtract(studentProgramAssociation, DateTime.parse("2000-01-01", DateHelper.getDateTimeFormat()))); Assert.assertTrue( "01-01-01",simpleExtractVerifier.shouldExtract(studentProgramAssociation, DateTime.parse("1999-01-01", DateHelper.getDateTimeFormat()))); }
@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()))); }
@Test public void testshouldExtractBeginDate() { Map<String, Object> body = new HashMap<String, Object>(); body.put(ParameterConstants.BEGIN_DATE, "2001-01-01"); Entity studentProgramAssociation = new MongoEntity(EntityNames.STUDENT_PROGRAM_ASSOCIATION, body); Assert.assertEquals(true, simpleExtractVerifier.shouldExtract(studentProgramAssociation, DateTime.parse("2001-01-01", DateHelper.getDateTimeFormat()))); Assert.assertEquals(true, simpleExtractVerifier.shouldExtract(studentProgramAssociation, null)); Assert.assertEquals(false, simpleExtractVerifier.shouldExtract(studentProgramAssociation, DateTime.parse("2000-01-01", DateHelper.getDateTimeFormat()))); }