Added test case for common prefix.