### Question:
LicenseTemplateService { public static LicenseTemplate update(final Context context, final String number, final LicenseTemplate licenseTemplate) throws NetLicensingException { CheckUtils.paramNotEmpty(number, "number"); CheckUtils.paramNotNull(licenseTemplate, "licenseTemplate"); return NetLicensingService.getInstance().post(context, Constants.LicenseTemplate.ENDPOINT_PATH + "/" + number, licenseTemplate.asRequestForm(), LicenseTemplate.class); }  static LicenseTemplate create(final Context context, final String productModuleNumber,
            final LicenseTemplate licenseTemplate); static LicenseTemplate get(final Context context, final String number); static Page<LicenseTemplate> list(final Context context, final String filter); static LicenseTemplate update(final Context context, final String number,
            final LicenseTemplate licenseTemplate); static void delete(final Context context, final String number, final boolean forceCascade);  }### Answer:
@Test public void testUpdate() throws Exception { final LicenseTemplate licenseTemplate = new LicenseTemplateImpl(); licenseTemplate.setNumber("LT002-TEST"); licenseTemplate.setLicenseType(LicenseType.FEATURE); licenseTemplate.setPrice(new BigDecimal(15)); licenseTemplate.setCurrency(Currency.EUR); licenseTemplate.addProperty(TIME_VOLUME_PROPERTY, ""); final LicenseTemplate updatedTemplate = LicenseTemplateService.update(context, "LT001-TEST", licenseTemplate); assertNotNull(updatedTemplate); assertEquals("LT002-TEST", updatedTemplate.getNumber()); assertEquals("Test License Template", updatedTemplate.getName()); assertEquals(LicenseType.FEATURE, updatedTemplate.getLicenseType()); assertEquals(true, updatedTemplate.getActive()); assertEquals(Currency.EUR, updatedTemplate.getCurrency()); assertEquals(new BigDecimal("15.00"), updatedTemplate.getPrice()); assertEquals(false, updatedTemplate.getAutomatic()); assertEquals(false, updatedTemplate.getHidden()); assertEquals(false, updatedTemplate.getHideLicenses()); assertEquals("PM001-TEST", updatedTemplate.getProductModule().getNumber()); assertNull(updatedTemplate.getProperties().get(TIME_VOLUME_PROPERTY)); }
@Test public void testUpdateLicenseTypeToTimeVolume() throws Exception { final LicenseTemplate licenseTemplate = new LicenseTemplateImpl(); licenseTemplate.setLicenseType(LicenseType.TIMEVOLUME); thrown.expect(ServiceException.class); thrown.expectMessage("IllegalOperationException: License template of type 'TIMEVOLUME' must have property 'timeVolume' specified."); LicenseTemplateService.update(context, "LT001-TEST", licenseTemplate); }