public void testSuperUser() throws Exception {
test(RbacUtil.SUPERUSER_USER);
}
private void test(String userName) throws Exception {
JmxManagementInterface jmx = JmxManagementInterface.create(
managementClient.getRemoteJMXURL(),
userName, RbacAdminCallbackHandler.STD_PASSWORD,
null // not needed, as the only thing from JmxManagementInterface used in this test is getConnection()
);
try {
getAttribute(userName, jmx);
setAttribute(userName, jmx);
operationReadOnly(userName, jmx);
operationWriteOnly(userName, jmx);
operationReadWrite(userName, jmx);
operationUnknown(userName, jmx);
} finally {
jmx.close();
}
}