class UpstreamFixed implements Supplier<String> {
    protected List<String> servers;
    protected Iterator<String> tmp;

    protected String server1;

    public UpstreamFixed(List<String> servers) {
        this.servers = servers;
        if (servers.size() == 1) {
            server1 = servers.get(0);
        } else {
            tmp = servers.iterator();
        }
    }

    @Override
    public String get() {<FILL_FUNCTION_BODY>}
}

        if (server1 == null) {
            if (tmp.hasNext() == false) {
                tmp = servers.iterator();
            }

            return tmp.next();
        } else {
            return server1;
        }
    
<no_super_class>