@Test
public void testThatEmptyLicensesAreFiltered() {

    LicenseInfoParsingResult emptyResult = new LicenseInfoParsingResult();
    LicenseInfoParsingResult emptyLicenseInfo = new LicenseInfoParsingResult();
    emptyLicenseInfo.setLicenseInfo(new LicenseInfo());
    LicenseInfoParsingResult parsingResults = new LicenseInfoParsingResult();
    LicenseInfo licenseInfo = new LicenseInfo();
    // @formatter:off
    licenseInfo.setLicenseNamesWithTexts(ImmutableSet.of(
            createLicense("nameOnly", null, null),
            createLicense(null, null, null),
            createLicense(null, "textOnly", null),
            createLicense("", null, null),
            createLicense(null, null, "ackOnly"),
            createLicense("", "", ""),
            createLicense("name", "text", "ack")
    ));
    // @formatter:on
    parsingResults.setLicenseInfo(licenseInfo);
    handler.filterEmptyLicenses(ImmutableList.of(emptyResult, emptyLicenseInfo, parsingResults));
    // @formatter:off
    Assert.assertThat(parsingResults.getLicenseInfo().getLicenseNamesWithTexts(), Matchers.containsInAnyOrder(
            createLicense("nameOnly", null, null),
            createLicense(null, "textOnly", null),
            createLicense(null, null, "ackOnly"),
            createLicense("name", "text", "ack")
    ));
    // @formatter:on
}