Test mbean via jmx connection.

Pull request for issue #6