Updating acceptance tests and adding unit tests.