LicenseManager { public boolean setLicense(EncryptedLicense encryptedLicense) { boolean success = decryptAndSetLicense(encryptedLicense); if(success) { saveEncryptedLicense(encryptedLicense); } return success; }  @PostConstruct void init(); void deleteLicense(); boolean setLicense(EncryptedLicense encryptedLicense); License getLicense(); List<LicenseError> getErrors(); License.State getLicenseState(int clientCount);  }
@Test public void setLicenseTest() throws IOException { License license = licenseManager.getLicense(); assertNull(license); EncryptedLicense encryptedLicense = mapper.readValue(json, EncryptedLicense.class); licenseManager.setLicense(encryptedLicense); List<EncryptedLicense> licenseList = licenseRepository.findAll(); assertNotNull(licenseList); assertEquals(1, licenseList.size()); EncryptedLicense el = licenseList.get(0); assertEquals(encryptedLicense.license, el.license); }