ticket:1 new unittest, fixed code formatting