Adjust tests; write integration test.