Adding basic testing framework

Code replication. Please deduplicate.