Refactoring integration test & condition API.