Added test and coverage