Added test codes to all common function unit tests