EST-282: Fix, add and refactor tests