class QualityThreshold {

    public QualityStatus toStatus(int percent) {
        if (percent < failure) {
            return QualityStatus.FAILED;
        } else if (percent < warning) {
            return QualityStatus.WARNING;
        }
        return QualityStatus.PASSED;
    }

}