### Question:
TransactionalConfigurationService implements ConfigurationService { @Override @PreAuthorize("hasPermission(#componentId, 'COMPONENT', 'GeneralPermission.ADMIN')") public void updateSapeConfiguration(SapeConfiguration configuration, long componentId) { sapeAccountId.setValue(configuration.getAccountId()); sapeTimeout.setValue(String.valueOf(configuration.getTimeout())); sapeHostUrl.setValue(configuration.getHostUrl()); sapeNumberOrLinks.setValue(String.valueOf(configuration.getNumberOfLinks())); sapeShowOnMainPage.setValue(String.valueOf(configuration.isShowOnMainPage())); sapeShowDummyLinks.setValue(String.valueOf(configuration.isShowDummyLinks())); sapeEnableService.setValue(String.valueOf(configuration.isEnableSape())); } TransactionalConfigurationService(
            JCommuneProperty sapeAccountId,
            JCommuneProperty sapeTimeout, 
            JCommuneProperty sapeHostUrl,
            JCommuneProperty sapeNumberOrLinks,
            JCommuneProperty sapeShowOnMainPage,
            JCommuneProperty sapeShowDummyLinks,
            JCommuneProperty sapeEnableService); @Override @PreAuthorize("hasPermission(#componentId, 'COMPONENT', 'GeneralPermission.ADMIN')") SapeConfiguration getSapeConfiguration(long componentId); @Override @PreAuthorize("hasPermission(#componentId, 'COMPONENT', 'GeneralPermission.ADMIN')") void updateSapeConfiguration(SapeConfiguration configuration, long componentId);  }### Answer:
@Test public void testUpdateSapeConfiguration() { SapeConfiguration configuration = new SapeConfiguration(); configuration.setAccountId(SAPE_ACCOUNT_ID); configuration.setTimeout(SAPE_TIMEOUT); configuration.setHostUrl(SAPE_HOST_URL); configuration.setNumberOfLinks(SAPE_NUMBER_OF_LINKS); configuration.setShowOnMainPage(SAPE_SHOW_ON_MAIN_PAGE); configuration.setShowDummyLinks(SAPE_SHOW_DUMMY_LINKS); Component component = new Component(); when(componentDao.getComponent()).thenReturn(component); configurationService.updateSapeConfiguration(configuration, COMPONENT_ID); verify(componentDao, times(6)).saveOrUpdate(any(Component.class)); assertEquals(component.getProperties().size(), 6); }