aboutsummaryrefslogtreecommitdiffstats
path: root/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/mock/HealthStatusMock.java
blob: 66aff350b8bc2c0430cd273ade5a1366a38ac415 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.routing.mock;

import com.yahoo.vespa.hosted.routing.status.HealthStatus;
import com.yahoo.vespa.hosted.routing.status.ServerGroup;

import java.util.List;

/**
 * @author mpolden
 */
public class HealthStatusMock implements HealthStatus {

    private ServerGroup status = new ServerGroup(List.of());

    public HealthStatusMock setStatus(ServerGroup newStatus) {
        this.status = newStatus;
        return this;
    }

    @Override
    public ServerGroup servers() {
        return status;
    }

}