ACE-461 Committed a fix (and did some reformatting), plus a test case.

git-svn-id: https://svn.apache.org/repos/asf/ace/trunk@1571642 13f79535-47bb-0310-9956-ffa450edef68