Update code for Unit test