AGP-420: add tests and , fix test environment