refactor tests; logs in elasticsearch