finished unit tests
added integration tests