private void compareRoot(CVSRoot root, String method, String user,
                             String password, String host, int port, String repository) {
        if (!(method == root.getMethod())) {
            fail("Bad connection method is parsed: '"+root.getMethod()+"', expected was '"+method+"'");
        }
        if (user != null && !user.equals(root.getUserName())) {
            fail("Bad user name is parsed: '"+root.getUserName()+"', expected was '"+user+"'");
        }
        if (password != null && !password.equals(root.getPassword())) {
            fail("Bad password is parsed: '"+root.getPassword()+"', expected was '"+password+"'");
        }
        if (host != null && !host.equals(root.getHostName())) {
            fail("Bad host name is parsed: '"+root.getHostName()+"', expected was '"+host+"'");
        }
        if (port != root.getPort()) {
            fail("Bad port is parsed: '"+root.getPort()+"', expected was '"+port+"'");
        }
        if (!repository.equals(root.getRepository())) {
            fail("Bad repository is parsed: '"+root.getRepository()+"', expected was '"+repository+"'");
        }
    }