Enhanced MBean Guard and added unit tests.