Refactor Test into UI