create unit test for decorator.