WFLY-1177 WIP
Added unit tests based upon code from Brian Stansberry.