Updated unit tests and testbed