testcase and refactor for setting feature