improve unit test, use interface.