Added some testing code.

Signed-off-by: Rob Urquhart <rob.urquhart@sfu.ca>