Source:
<code>public void testStoreServerTemplate() { templateStorage.store(serverTemplate); boolean exists = templateStorage.exists(serverTemplate.getId()); assertTrue(exists); ServerTemplate fromStorage = templateStorage.load(serverTemplate.getId()); assertNotNull(fromStorage); assertEquals(serverTemplate.getId(), fromStorage.getId()); <START> if (isRequired()) <END> assertEquals(serverTemplate.getName(), fromStorage.getName()); checkTemplateInstances(fromStorage); Collection<ContainerSpec> containerSpecs = fromStorage.getContainersSpec(); assertNotNull(containerSpecs); assertEquals(1, containerSpecs.size()); ContainerSpec spec = containerSpecs.iterator().next(); assertNotNull(spec); assertEquals(containerSpec.getId(), spec.getId()); assertEquals(containerSpec.getReleasedId(), spec.getReleasedId()); assertEquals(containerSpec.getServerTemplateKey().getId(), spec.getServerTemplateKey().getId()); if (isRequired()) assertEquals(containerSpec.getServerTemplateKey().getName(), spec.getServerTemplateKey().getName()); assertEquals(containerSpec.getConfigs().size(), spec.getConfigs().size()); assertTrue(spec.getConfigs().containsKey(Capability.RULE)); assertTrue(spec.getConfigs().containsKey(Capability.PROCESS)); RuleConfig ruleConfig = (RuleConfig) spec.getConfigs().get(Capability.RULE); assertNotNull(ruleConfig); assertEquals(this.ruleConfig.getPollInterval(), ruleConfig.getPollInterval()); assertEquals(this.ruleConfig.getScannerStatus(), ruleConfig.getScannerStatus()); ProcessConfig processConfig = (ProcessConfig) spec.getConfigs().get(Capability.PROCESS); assertNotNull(processConfig); assertEquals(this.processConfig.getKBase(), processConfig.getKBase()); assertEquals(this.processConfig.getKSession(), processConfig.getKSession()); assertEquals(this.processConfig.getMergeMode(), processConfig.getMergeMode()); assertEquals(this.processConfig.getRuntimeStrategy(), processConfig.getRuntimeStrategy()); }</code><technical_language>wrap {}</technical_language>

Target:
public void testStoreServerTemplate() { templateStorage.store(serverTemplate); boolean exists = templateStorage.exists(serverTemplate.getId()); assertTrue(exists); ServerTemplate fromStorage = templateStorage.load(serverTemplate.getId()); assertNotNull(fromStorage); assertEquals(serverTemplate.getId(), fromStorage.getId()); if (isEnclosedTestAssertionRequired()) { assertEquals(serverTemplate.getName(), fromStorage.getName()); } checkTemplateInstances(fromStorage); Collection<ContainerSpec> containerSpecs = fromStorage.getContainersSpec(); assertNotNull(containerSpecs); assertEquals(1, containerSpecs.size()); ContainerSpec spec = containerSpecs.iterator().next(); assertNotNull(spec); assertEquals(containerSpec.getId(), spec.getId()); assertEquals(containerSpec.getReleasedId(), spec.getReleasedId()); assertEquals(containerSpec.getServerTemplateKey().getId(), spec.getServerTemplateKey().getId()); if (isEnclosedTestAssertionRequired()) { assertEquals(containerSpec.getServerTemplateKey().getName(), spec.getServerTemplateKey().getName()); } assertEquals(containerSpec.getConfigs().size(), spec.getConfigs().size()); assertTrue(spec.getConfigs().containsKey(Capability.RULE)); assertTrue(spec.getConfigs().containsKey(Capability.PROCESS)); RuleConfig ruleConfig = (RuleConfig) spec.getConfigs().get(Capability.RULE); assertNotNull(ruleConfig); assertEquals(this.ruleConfig.getPollInterval(), ruleConfig.getPollInterval()); assertEquals(this.ruleConfig.getScannerStatus(), ruleConfig.getScannerStatus()); ProcessConfig processConfig = (ProcessConfig) spec.getConfigs().get(Capability.PROCESS); assertNotNull(processConfig); assertEquals(this.processConfig.getKBase(), processConfig.getKBase()); assertEquals(this.processConfig.getKSession(), processConfig.getKSession()); assertEquals(this.processConfig.getMergeMode(), processConfig.getMergeMode()); assertEquals(this.processConfig.getRuntimeStrategy(), processConfig.getRuntimeStrategy()); }