refactored mocker interface and added tests