Source:
<code>public void testUpdateContainerInAccount() throws JSONException { Account account = Account.fromJson(accountJsonLike); AccountBuilder accountBuilder = new AccountBuilder(account); for (int i = 0; i < CONTAINER_COUNT; i++) { Container container = account.getContainerById(refContainerIds.get(i)); accountBuilder.removeContainer(container); ContainerBuilder containerBuilder = new ContainerBuilder(container); <START> short updatedContainerId = (short) (container.getId() + 100); <END> String updatedContainerName = container.getName() + "-updated"; Container.ContainerStatus updatedContainerStatus = Container.ContainerStatus.INACTIVE; String updatedContainerDescription = container.getDescription() + "--updated"; boolean updatedIsPrivate = !container.isPrivate(); containerBuilder.setId(updatedContainerId) .setName(updatedContainerName) .setStatus(updatedContainerStatus) .setDescription(updatedContainerDescription) .setIsPrivate(updatedIsPrivate); Container updatedContainer = containerBuilder.build(); accountBuilder.addOrUpdateContainer(updatedContainer); Account updatedAccount = accountBuilder.build(); assertEquals("container id is not correctly updated", updatedContainerId, updatedAccount.getContainerById(updatedContainerId).getId()); assertEquals("container name is not correctly updated", updatedContainerName, updatedAccount.getContainerById(updatedContainerId).getName()); assertEquals("container status is not correctly updated", updatedContainerStatus, updatedAccount.getContainerById(updatedContainerId).getStatus()); assertEquals("container description is not correctly updated", updatedContainerDescription, updatedAccount.getContainerById(updatedContainerId).getDescription()); assertEquals("container isPrivate attribute is not correctly updated", updatedIsPrivate, updatedAccount.getContainerById(updatedContainerId).isPrivate()); } }</code><technical_language>do +100 collide other existing container Ids</technical_language>

Target:
public void testUpdateContainerInAccount() throws JSONException { Account account = Account.fromJson(accountJsonLike); AccountBuilder accountBuilder = new AccountBuilder(account); for (int i = 0; i < CONTAINER_COUNT; i++) { Container container = account.getContainerById(refContainerIds.get(i)); accountBuilder.removeContainer(container); ContainerBuilder containerBuilder = new ContainerBuilder(container); short updatedContainerId = (short) (-1 * (container.getId())); String updatedContainerName = container.getName() + "-updated"; Container.ContainerStatus updatedContainerStatus = Container.ContainerStatus.INACTIVE; String updatedContainerDescription = container.getDescription() + "--updated"; boolean updatedIsPrivate = !container.isPrivate(); containerBuilder.setId(updatedContainerId) .setName(updatedContainerName) .setStatus(updatedContainerStatus) .setDescription(updatedContainerDescription) .setIsPrivate(updatedIsPrivate); Container updatedContainer = containerBuilder.build(); accountBuilder.addOrUpdateContainer(updatedContainer); Account updatedAccount = accountBuilder.build(); assertEquals("container id is not correctly updated", updatedContainerId, updatedAccount.getContainerById(updatedContainerId).getId()); assertEquals("container name is not correctly updated", updatedContainerName, updatedAccount.getContainerById(updatedContainerId).getName()); assertEquals("container status is not correctly updated", updatedContainerStatus, updatedAccount.getContainerById(updatedContainerId).getStatus()); assertEquals("container description is not correctly updated", updatedContainerDescription, updatedAccount.getContainerById(updatedContainerId).getDescription()); assertEquals("container isPrivate attribute is not correctly updated", updatedIsPrivate, updatedAccount.getContainerById(updatedContainerId).isPrivate()); } }