Modified the expand() custom test method naming code & added testcases using David Wolever suggestions.