Extended test framework.

Wrote a testing framework since JUnit is not working as expected.