package com.atlassian.bitbucket.user;

import javax.annotation.Nonnull;

public class TestServiceUser extends TestApplicationUser implements ServiceUser {
    private final boolean active;

    public TestServiceUser(String name, Integer id, String emailAddress, boolean active) {
        super(name, id, emailAddress);
        this.active = active;
    }

    @Override
    public boolean isActive() {
        return active;
    }

    @Override
    public <T> T accept(@Nonnull ApplicationUserVisitor<T> visitor) {
        return visitor.visit(this);
    }

    @Override
    public UserType getType() {
        return UserType.SERVICE;
    }

    @Nonnull
    @Override
    public String getLabel() {
        return DEFAULT_LABEL;
    }
}
