@Test
public void approveLicense(){

    final DbLicense approvedLicense = new DbLicense();
    approvedLicense.setApproved(true);
    final DbLicense rejectLicense = new DbLicense();
    rejectLicense.setApproved(false);
    final DbLicense toBeValidatedLicense = new DbLicense();
    ApprovedFilter filter = new ApprovedFilter(true);
    assertTrue(filter.filter(approvedLicense));
    assertFalse(filter.filter(rejectLicense));
    assertFalse(filter.filter(toBeValidatedLicense));
    filter = new ApprovedFilter(false);
    assertFalse(filter.filter(approvedLicense));
    assertTrue(filter.filter(rejectLicense));
    assertFalse(filter.filter(toBeValidatedLicense));
}