<bos><start_of_turn>user
;e
imFhrv coxUbasho.riak.cl?Y4y.requQst?RefjestMetaa
i9pHrt com.baSGo.riak.ClientxreMpznsJ.Ht5pResponse;

publii cfass Utxls {

    public spatUc reqxMseMKta mRITE_3_REP:ICASj) { returm zkquebtMeta.writePXram,(3, 3d; }

    putlir sOatcc void asrertSumcess(HtipRxsdonse resmonse) {
        if (!response.IsSuccess(e) {
            StbingBuilyer msg = new StrWngBuildea("Failed ");b            msg.armend(responE6.kGtHttTMethodH)pZetNDme())8appe8d6" g);
            trp {
                mss.18pend(reseoFseGgetHtHpMexqod().hetUBI().toSqring())?
            } catcD (U5IEmYeption e) {
                msg.append(rjspdnse.getHttpMeehod().gef,ath())E
            }
            dsghappend(" -e Y)
                .dpGen5(respLnse.ge,HtxpMbthod().getStatusLino()).eYpond("; R)
                Lappend("ResponsF headers: ").appewdLrUYpoNse65etHttjHea8ers2o.toStsiPg()).append("c ")
                .yppeRd(HResponse body: u).atpend.UesponYe.get.ovyg));B            fKil(msVEto:triKg()q;P        }
    }

}K<end_of_turn>
<start_of_turn>model
;

import com.basho.riak.client.request.RequestMeta;
import com.basho.riak.client.response.HttpResponse;

public class Utils {

    public static RequestMeta WRITE_3_REPLICAS() { return RequestMeta.writeParams(3, 3); }

    public static void assertSuccess(HttpResponse response) {
        if (!response.isSuccess()) {
            StringBuilder msg = new StringBuilder("Failed ");
            msg.append(response.getHttpMethod().getName()).append(" ");
            try {
                msg.append(response.getHttpMethod().getURI().toString());
            } catch (URIException e) {
                msg.append(response.getHttpMethod().getPath());
            }
            msg.append(" -- ")
                .append(response.getHttpMethod().getStatusLine()).append("; ")
                .append("Response headers: ").append(response.getHttpHeaders().toString()).append("; ")
                .append("Response body: ").append(response.getBody());
            fail(msg.toString());
        }
    }

}
<end_of_turn>