add Master, ClockService UT and minor bug fix
Merge pull request #144 from huafengw/test

add Master, ClockService UT and minor bug fix