test_class.file: services/src/test/java/com/greensopinion/finance/services/domain/TransactionsTest.java
test_class.identifier: TransactionsTest
test_case.body: @Test
  	public void copyWithReplacement() {
  		Transaction t1 = MockTransaction.create("2015-01-02", "a", 123);
  		Transaction t2 = MockTransaction.create("2015-01-02", "a", 123);
  		Transaction t3 = t1.withCategoryName("a cat");
  		Transactions transactions = new Transactions(ImmutableList.of(t1, t2));
  
  		Transactions copyWithReplacement = transactions.copyWithReplacement(t3);
  		assertNotNull(copyWithReplacement);
  		assertNotSame(transactions, copyWithReplacement);
  		assertSame(t3, copyWithReplacement.byId(t3.getId()));
  		assertSame(t1, transactions.byId(t1.getId()));
  		assertEquals(ImmutableList.of(t1, t2), transactions.getTransactions());
  		assertEquals(ImmutableList.of(t3, t2), copyWithReplacement.getTransactions());
  	}
test_case.class_method_signature: TransactionsTest.copyWithReplacement()
test_case.full_signature: @Test public void copyWithReplacement()
test_case.identifier: copyWithReplacement
test_case.invocations: create create withCategoryName of copyWithReplacement assertNotNull assertNotSame assertSame byId getId assertSame byId getId assertEquals of getTransactions assertEquals of getTransactions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void copyWithReplacement()
focal_class.declarator: transactions
focal_class.modifier: private final
focal_class.original_string: private final List<Transaction> transactions;
focal_class.type: List<Transaction>
focal_class.var_name: transactions
focal_class.file: services/src/main/java/com/greensopinion/finance/services/domain/Transactions.java
focal_class.identifier: Transactions
focal_class.class_method_signature: Transactions.Transactions()
focal_class.full_signature: public  Transactions()
focal_class.identifier: Transactions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Transactions()
focal_class.class_method_signature: Transactions.Transactions(List<Transaction> transactions)
focal_class.full_signature: public  Transactions(List<Transaction> transactions)
focal_class.identifier: Transactions
focal_class.modifiers: public
focal_class.parameters: (List<Transaction> transactions)
focal_class.signature:  Transactions(List<Transaction> transactions)
focal_class.class_method_signature: Transactions.Transactions(Transaction... transactions)
focal_class.full_signature: public  Transactions(Transaction... transactions)
focal_class.identifier: Transactions
focal_class.modifiers: public
focal_class.parameters: (Transaction... transactions)
focal_class.signature:  Transactions(Transaction... transactions)
focal_class.class_method_signature: Transactions.getTransactions()
focal_class.full_signature: public List<Transaction> getTransactions()
focal_class.identifier: getTransactions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Transaction>
focal_class.signature: List<Transaction> getTransactions()
focal_class.class_method_signature: Transactions.byId(String id)
focal_class.full_signature: public Transaction byId(String id)
focal_class.identifier: byId
focal_class.modifiers: public
focal_class.parameters: (String id)
focal_class.return: Transaction
focal_class.signature: Transaction byId(String id)
focal_class.class_method_signature: Transactions.copyWithReplacement(Transaction transaction)
focal_class.full_signature: public Transactions copyWithReplacement(Transaction transaction)
focal_class.identifier: copyWithReplacement
focal_class.modifiers: public
focal_class.parameters: (Transaction transaction)
focal_class.return: Transactions
focal_class.signature: Transactions copyWithReplacement(Transaction transaction)
focal_method.body: public Transactions copyWithReplacement(Transaction transaction) {
  		boolean found = false;
  		ImmutableList.Builder<Transaction> builder = ImmutableList.<Transaction> builder();
  		for (Transaction t : transactions) {
  			if (t.getId().equals(transaction.getId())) {
  				found = true;
  				builder.add(transaction);
  			} else {
  				builder.add(t);
  			}
  		}
  		checkArgument(found, "Transaction not present");
  		return new Transactions(builder.build());
  	}
focal_method.class_method_signature: Transactions.copyWithReplacement(Transaction transaction)
focal_method.full_signature: public Transactions copyWithReplacement(Transaction transaction)
focal_method.identifier: copyWithReplacement
focal_method.invocations: builder equals getId getId add add checkArgument build
focal_method.modifiers: public
focal_method.parameters: (Transaction transaction)
focal_method.return: Transactions
focal_method.signature: Transactions copyWithReplacement(Transaction transaction)