Refactor robot test