LicenseHandler implements LicenseService.Iface { @Override public License getByID(String id, String organisation) throws TException { assertNotEmpty(id); assertNotEmpty(organisation); return handler.getLicenseForOrganisation(id, organisation); } LicenseHandler(); @Override List<Obligation> getObligations(); @Override List<License> getLicenseSummary(); @Override List<License> getLicenseSummaryForExport(); @Override List<License> getDetailedLicenseSummaryForExport(String organisation); @Override List<License> getDetailedLicenseSummary(String organisation, List<String> identifiers); @Override List<RiskCategory> addRiskCategories(List<RiskCategory> riskCategories, User user); @Override List<Risk> addRisks(List<Risk> risks, User user); @Override List<Obligation> addObligations(List<Obligation> obligations, User user); @Override List<LicenseType> addLicenseTypes(List<LicenseType> licenseTypes, User user); @Override List<License> addLicenses(List<License> licenses, User user); @Override List<Todo> addTodos(List<Todo> todos, User user); @Override List<RiskCategory> getRiskCategories(); @Override List<Risk> getRisks(); @Override List<LicenseType> getLicenseTypes(); @Override List<License> getLicenses(); @Override List<Todo> getTodos(); @Override List<Risk> getRisksByIds(List<String> ids); @Override List<RiskCategory> getRiskCategoriesByIds(List<String> ids); @Override List<Obligation> getObligationsByIds(List<String> ids); @Override List<LicenseType> getLicenseTypesByIds(List<String> ids); @Override List<Todo> getTodosByIds(List<String> ids); @Override License getByID(String id, String organisation); @Override License getByIDWithOwnModerationRequests(String id, String organisation, User user); @Override List<License> getByIds(Set<String> ids, String organisation); @Override Risk getRiskById(String id); @Override RiskCategory getRiskCategoryById(String id); @Override Obligation getObligationById(String id); @Override LicenseType getLicenseTypeById(String id); @Override Todo getTodoById(String id); @Override String addTodo(Todo todo, User user); @Override RequestStatus addTodoToLicense(Todo todo, String licenseId, User user); @Override RequestStatus updateLicense(License license, User user, User requestingUser); @Override RequestStatus updateLicenseFromModerationRequest(License licenseAdditions,
                                                            License licenseDeletions,
                                                            User user,
                                                            User requestingUser); @Override RequestStatus updateWhitelist(String licenceId, Set<String> whitelist, User user); @Override RequestStatus deleteLicense(String id, User user); @Override List<CustomProperties> getCustomProperties(String documentType); @Override RequestStatus updateCustomProperties(CustomProperties customProperties, User user); @Override RequestSummary deleteAllLicenseInformation(User user); @Override RequestSummary importAllSpdxLicenses(User user);  }
@Test(expected = SW360Exception.class) public void testGetLicense2() throws Exception { License license = handler.getByID("zzPdtr", user.getDepartment()); assertNull(license); }
@Test(expected = SW360Exception.class) public void testGetLicense3() throws Exception { License license = handler.getByID(todos.values().iterator().next().getId(), user.getDepartment()); assertNull(license); }