Added test framework.

That's already fixed, please rebase before merging.