@Test
public void test_logic() {

    AuthenticatorImpl authenticator;
    Node<Response, Response> loginNode;
    Response response;
    // Http 400, Error A
    response = new Response();
    response.error = Error.A.getErrorMsg();
    response.statusCode = 400;
    authenticator = new AuthenticatorImpl(response);
    loginNode = createGraph(authenticator);
    loginNode.emitOutput();
    assertTrue(authenticator.failed());
    // Http 401, Error D
    response = new Response();
    response.error = Error.D.getErrorMsg();
    response.statusCode = 401;
    authenticator = new AuthenticatorImpl(response);
    loginNode = createGraph(authenticator);
    loginNode.emitOutput();
    assertTrue(authenticator.failed());
    // Http 200
    response = new Response();
    response.statusCode = 200;
    authenticator = new AuthenticatorImpl(response);
    loginNode = createGraph(authenticator);
    loginNode.emitOutput();
    assertTrue(authenticator.succeeded());
}