}
@Test
public void testPublicKeyAuthWithCache() throws Exception {
final ConcurrentHashMap<String, AtomicInteger> count = new ConcurrentHashMap<String, AtomicInteger>();
TestCachingPublicKeyAuthenticator auth = new TestCachingPublicKeyAuthenticator(new PublickeyAuthenticator() {
public boolean authenticate(String username, PublicKey key,
ServerSession session) {
count.putIfAbsent(KeyUtils.getFingerPrint(key), new AtomicInteger());
count.get(KeyUtils.getFingerPrint(key)).incrementAndGet();
return key.equals(pairRsa.getPublic());