### Question:
TAMConnector implements PoolableConnector, AuthenticateOp, CreateOp, SchemaOp, TestOp,
        DeleteOp, UpdateOp, SearchOp<String> { public Uid authenticate(ObjectClass oc, String user, GuardedString gs, OperationOptions oo) { final String method = "authenticate"; LOG.info("Entry {0}", method); Uid uid = null; if (ObjectClass.ACCOUNT.is(oc.getObjectClassValue())) { try { PDMessages msgs = new PDMessages(); PDUser pdUser = new PDUser(ctxt, user, msgs); processMessages(method, msgs); if (pdUser.isPasswordValid()) { uid = new Uid(user); } } catch (PDException e) { convertPDExceptionToConnectorException(e); } catch (Exception e) { throw new ConnectorException(e); } } LOG.info("Exit {0}", method); return uid; }  Configuration getConfiguration(); void init(Configuration config); void dispose(); void checkAlive(); Uid create(final ObjectClass objClass, final Set<Attribute> attributes,
            final OperationOptions options); FilterTranslator<String> createFilterTranslator(ObjectClass objClass,
            OperationOptions options); void executeQuery(ObjectClass objClass, String query, ResultsHandler handler,
            OperationOptions options); void test(); Uid update(ObjectClass objClass, Uid uid, Set<Attribute> replaceAttributes,
            OperationOptions options); void delete(final ObjectClass objClass, final Uid uid, final OperationOptions options); Schema schema(); Uid authenticate(ObjectClass oc, String user, GuardedString gs, OperationOptions oo); static final String ATTR_REGISTRY_NAME; static final String ATTR_FIRST_NAME; static final String ATTR_LAST_NAME; static final String ATTR_SSO_USER; static final String ATTR_PASSWORD_POLICY; static final String ATTR_EXPIRE_PASSWORD; static final String ATTR_DELETE_FROM_REGISTRY; static final String ATTR_SYNC_GSO_CREDENTIALS; static final String ATTR_IMPORT_FROM_REGISTRY; static final String ATTR_GROUP_MEMBERS; static final String ATTR_GSO_WEB_CREDENTIALS; static final String ATTR_GSO_GROUP_CREDENTIALS; static final String TYPE_GSO_GROUP_RESOURCE; static final String TYPE_GSO_RESOURCE; static final String TOKEN_GSO_RESOURCE; }### Answer:
@Test(enabled = false) public void testSuccesAuthenticate() { Uid uid = new Uid("AAA0001"); GuardedString password = new GuardedString("Passw0rd".toCharArray()); OperationOptions oo = null; Uid result = facade.authenticate(ObjectClass.ACCOUNT, uid.getUidValue(), password, oo); Assert.assertEquals(uid, result); }
@Test(enabled = false, expectedExceptions = Exception.class) public void testFailAuthenticate() { Uid uid = new Uid("AAA0001"); GuardedString password = new GuardedString("dr0wssaP".toCharArray()); OperationOptions oo = null; Uid result = facade.authenticate(ObjectClass.ACCOUNT, uid.getUidValue(), password, oo); Assert.assertEquals(uid, result); }