Add some testing.

We just add some tests (unit and funtional) here.