AlfrescoTicketCmisAuthenticationProvider extends StandardAuthenticationProvider { @Override protected String getPassword() { return getTicket(); }  void setWebscriptCaller(WebScriptCaller webscriptCaller); @Override void putResponseHeaders(String url, int statusCode, Map<String, List<String>> headers);  }
@Test public void testGetPassword() { Set<String> replies = new TreeSet<String>(); for (int i = 0; i < 1000; ++i) { replies.add(authProvider.getPassword()); } Assert.assertEquals(1, replies.size()); for (String reply : replies) { Assert.assertTrue(reply.startsWith("ticket")); } }