added integration tests, fixed checkstyle warnings