    @Test
    public void testSearch() throws Exception {

        UserManager userLocator = this.lookup(UserManager.class, RemoteUserTokenAuthenticatingRealm.REALM_NAME);

        Set<User> result = userLocator.searchUsers(new UserSearchCriteria("joh"));
        Assert.assertEquals(1, result.size());
        // your test could be a bit more robust
        Assert.assertEquals("johnson", result.iterator().next().getUserId());
    }