@Test
public void findMatchingLicenses(){

    final DbLicense license = new DbLicense();
    license.setName("LGPL-3.0");
    license.setRegexp("((.*)(GNU)(.*)(lesser)(.*)|(LGPL)*)(?!.*(GPL|gpl|BSD|SQL|COMM|W|CC|GNU)).*(3)+(.*)");
    final RepositoryHandler repoHandler = mock(RepositoryHandler.class);
    when(repoHandler.getAllLicenses()).thenReturn(Collections.singletonList(license));
    final LicenseHandler licenseHandler = new LicenseHandler(repoHandler);
    assertEquals(1, licenseHandler.getMatchingLicenses("LGPL-3.0").size());
}