Tests

Add unit tests.