Source:
<code>public void testContainerSpecSerialization() { final ContainerSpec spec = new ContainerSpec(); spec.setId("id"); spec.setContainerName("name"); spec.setStatus(KieContainerStatus.STARTED); spec.setReleasedId(new ReleaseId("groupId", "artifactId", "1.0")); final ProcessConfig processConfig = new ProcessConfig("runtimeStrategy", "kBase", "kSession", "mergeMode"); spec.addConfig(Capability.PROCESS, processConfig); <START> final RuleConfig ruleConfig = new RuleConfig(1l, <END> KieScannerStatus.SCANNING); spec.addConfig(Capability.RULE, ruleConfig); final String specContent = client.serialize(spec); final ContainerSpec specResult = client.deserialize(specContent, ContainerSpec.class); assertNotNull(specResult); assertEquals(spec, specResult); assertEquals(spec.getId(), specResult.getId()); assertEquals(spec.getStatus(), specResult.getStatus()); assertEquals(spec.getContainerName(), specResult.getContainerName()); assertEquals(spec.getConfigs(), specResult.getConfigs()); assertEquals(spec.getReleasedId(), specResult.getReleasedId()); assertNotNull(specResult.getConfigs()); final ContainerConfig processConfigResult = specResult.getConfigs().get(Capability.PROCESS); assertNotNull(processConfigResult); assertTrue(processConfigResult instanceof ProcessConfig); assertEquals(processConfig, processConfigResult); final ContainerConfig ruleConfigResult = specResult.getConfigs().get(Capability.RULE); assertNotNull(ruleConfigResult); assertTrue(ruleConfigResult instanceof RuleConfig); assertEquals(ruleConfig, ruleConfigResult); }</code><technical_language>Please 1L for readability</technical_language>

Target:
public void testContainerSpecSerialization() { final ContainerSpec spec = new ContainerSpec(); spec.setId("id"); spec.setContainerName("name"); spec.setStatus(KieContainerStatus.STARTED); spec.setReleasedId(new ReleaseId("groupId", "artifactId", "1.0")); final ProcessConfig processConfig = new ProcessConfig("runtimeStrategy", "kBase", "kSession", "mergeMode"); spec.addConfig(Capability.PROCESS, processConfig); final RuleConfig ruleConfig = new RuleConfig(1L, KieScannerStatus.SCANNING); spec.addConfig(Capability.RULE, ruleConfig); final String specContent = client.serialize(spec); LOGGER.info("{} content\n{}", marshallingFormat.getType(), specContent); final ContainerSpec specResult = client.deserialize(specContent, ContainerSpec.class); assertNotNull(specResult); assertEquals(spec, specResult); assertEquals(spec.getId(), specResult.getId()); assertEquals(spec.getStatus(), specResult.getStatus()); assertEquals(spec.getContainerName(), specResult.getContainerName()); assertEquals(spec.getConfigs(), specResult.getConfigs()); assertEquals(spec.getReleasedId(), specResult.getReleasedId()); assertNotNull(specResult.getConfigs()); final ContainerConfig processConfigResult = specResult.getConfigs().get(Capability.PROCESS); assertNotNull(processConfigResult); assertTrue(processConfigResult instanceof ProcessConfig); assertEquals(processConfig, processConfigResult); final ContainerConfig ruleConfigResult = specResult.getConfigs().get(Capability.RULE); assertNotNull(ruleConfigResult); assertTrue(ruleConfigResult instanceof RuleConfig); assertEquals(ruleConfig, ruleConfigResult); }