Added test and fixed bugs for ParseConnections.