@Test public void testAddVariable() { globalTransactionUnderTest.addVariable("itemName", "pizza"); assertThat(globalTransactionUnderTest.getVariables()).hasSize(1); }
public void addVariable(final GlobalTransactionVariable variable) { if (this.variables == null) { this.variables = new HashSet<>(); } this.variables.add(variable); }
GlobalTransaction { public void addVariable(final GlobalTransactionVariable variable) { if (this.variables == null) { this.variables = new HashSet<>(); } this.variables.add(variable); } }
GlobalTransaction { public void addVariable(final GlobalTransactionVariable variable) { if (this.variables == null) { this.variables = new HashSet<>(); } this.variables.add(variable); } @java.beans.ConstructorProperties({ "id", "timestamp", "variables", "status", "localTransactions" })  GlobalTransaction(String id,  Long timestamp, Set<GlobalTransactionVariable> variables,
			GlobalTransactionStatus status, List<LocalTransaction> localTransactions);   GlobalTransaction(); }
GlobalTransaction { public void addVariable(final GlobalTransactionVariable variable) { if (this.variables == null) { this.variables = new HashSet<>(); } this.variables.add(variable); } @java.beans.ConstructorProperties({ "id", "timestamp", "variables", "status", "localTransactions" })  GlobalTransaction(String id,  Long timestamp, Set<GlobalTransactionVariable> variables,
			GlobalTransactionStatus status, List<LocalTransaction> localTransactions);   GlobalTransaction(); static GlobalTransactionBuilder builder(); void addLocalTransaction(final LocalTransaction localTransaction); void addVariable(final GlobalTransactionVariable variable); void addVariable(final String key, final String value); Optional<String> getVariableValue(final String key); String getId(); Long getTimestamp(); Set<GlobalTransactionVariable> getVariables(); GlobalTransactionStatus getStatus(); List<LocalTransaction> getLocalTransactions(); void setId(String id); void setTimestamp(Long timestamp); void setVariables(Set<GlobalTransactionVariable> variables); void setStatus(GlobalTransactionStatus status); String getParent(); void setParent(String parent); boolean isNew(); void setNew(boolean aNew); String getTraceId(); void setTraceId(String traceId); void setLocalTransactions(List<LocalTransaction> localTransactions); static GlobalTransaction create(String name, String traceId); String getName(); void setName(String name); }
GlobalTransaction { public void addVariable(final GlobalTransactionVariable variable) { if (this.variables == null) { this.variables = new HashSet<>(); } this.variables.add(variable); } @java.beans.ConstructorProperties({ "id", "timestamp", "variables", "status", "localTransactions" })  GlobalTransaction(String id,  Long timestamp, Set<GlobalTransactionVariable> variables,
			GlobalTransactionStatus status, List<LocalTransaction> localTransactions);   GlobalTransaction(); static GlobalTransactionBuilder builder(); void addLocalTransaction(final LocalTransaction localTransaction); void addVariable(final GlobalTransactionVariable variable); void addVariable(final String key, final String value); Optional<String> getVariableValue(final String key); String getId(); Long getTimestamp(); Set<GlobalTransactionVariable> getVariables(); GlobalTransactionStatus getStatus(); List<LocalTransaction> getLocalTransactions(); void setId(String id); void setTimestamp(Long timestamp); void setVariables(Set<GlobalTransactionVariable> variables); void setStatus(GlobalTransactionStatus status); String getParent(); void setParent(String parent); boolean isNew(); void setNew(boolean aNew); String getTraceId(); void setTraceId(String traceId); void setLocalTransactions(List<LocalTransaction> localTransactions); static GlobalTransaction create(String name, String traceId); String getName(); void setName(String name);  }