package node.company;

import org.joda.time.DateTime;

import data.trainnetwork.BookableSection;
import transaction.FailedTransactionException;
import transaction.TransactionContent;
import transaction.Vault;

public abstract class TransactionContentGenerator extends TransactionContent<String, Vault<BookableSection>> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3685066724312335230L;

	public static TransactionContent<String, Vault<BookableSection>> getTestContent() {
		TransactionContent<String, Vault<BookableSection>> c 
			= new TransactionContent<String, Vault<BookableSection>>() {
			private static final long serialVersionUID = -8167406104784795108L;
			@Override
			public void run() throws FailedTransactionException {
				BookableSection s = new BookableSection("section", 1, DateTime.now(), 10, 10);
				System.out.println("EXECUTING");
				data.put(s.getID(), new Vault<BookableSection>(s));
			}
		};
		
		return c;
	}
	
	
}

@@ -16,16 +16,39 @@
 mpany;%0A%0A
+import java.util.Map;%0A%0A
 import o
@@ -892,16 +892,145 @@
 %22);%0A%09%09%09%09
+%0A%09%09%09%09Map %3CString, Vault%3CBookableSection%3E%3E _data = (Map%3CString, Vault%3CBookableSection%3E%3E) manager.writeLock(new Vault(data));%0A%09%09%09%09_
 data.put
@@ -1073,16 +1073,26 @@
 n%3E(s));%0A
+%09%09%09%09%0A%09%09%09%09%0A
 %09%09%09%7D%0A%09%09%7D

Extend test code to verify behaviour of vaults with transactions