Method getSingular has been tested systematically. Several test cases were added.