@Test
public void doesNotFailEvenWithWrongPattern(){

    final DbLicense license = new DbLicense();
    license.setName("Test");
    license.setRegexp("x^[");
    final RepositoryHandler repoHandler = mock(RepositoryHandler.class);
    when(repoHandler.getAllLicenses()).thenReturn(Collections.singletonList(license));
    final LicenseHandler licenseHandler = new LicenseHandler(repoHandler);
    Exception exception = null;
    DbLicense resolvedLicense = null;
    try{
        resolvedLicense = licenseHandler.resolve(license.getName());
    }
    catch (Exception e){
        exception = e;
    }
    assertEquals(null, exception);
    assertEquals(null, resolvedLicense);
}