unit tests and acceptance tests from ksp499