some fix on template and test case
mock server bug fix