Add integration test for compact functionality