@Test
    public void testGetClustersAsAnonUser() throws Exception {
        JsonElement jsonResponse;
        ConnectionParams adminConnectionParams = createAdminConnectionParams();
        String anonUserName = "nothing";
        String anonUserPwd = "nothing";

        /**
         * Create a new user (non-admin)
         */
        ClusterUtils.createUser(adminConnectionParams, clusterName, anonUserName, anonUserPwd, AmbariUserRole.NONE);

        /**
         * Attempt to query all the clusters using this user's privilege. Right now we should be
         * able to get the list of clusters, though this user should not be able to. But this is
         * required for UI to display the clusters.
         *
         * todo: Fix this when UI is fixed.
         */
        ConnectionParams anonUserParams = createConnectionParams(anonUserName, anonUserPwd);
        jsonResponse = RestApiUtils.executeRequest(new GetAllClustersWebRequest(anonUserParams));

        assertFalse(jsonResponse.isJsonNull());

        /**
         * Delete the user
         */
        jsonResponse = RestApiUtils.executeRequest(new DeleteUserWebRequest(adminConnectionParams, anonUserName));
        LOG.info(jsonResponse);
    }
Creates an anonymous user (user with no role). Attempts to get the list of clusters

@throws Exception
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/RoleBasedAccessControlBasicTest.java