Final Code with JunittestCases