Ejemplo n.º 1
0
 public static ResponseDefinition copyOf(ResponseDefinition original) {
   ResponseDefinition newResponseDef = new ResponseDefinition();
   newResponseDef.status = original.status;
   newResponseDef.body = original.body;
   newResponseDef.isBinaryBody = original.isBinaryBody;
   newResponseDef.bodyFileName = original.bodyFileName;
   newResponseDef.headers = original.headers;
   newResponseDef.fixedDelayMilliseconds = original.fixedDelayMilliseconds;
   newResponseDef.proxyBaseUrl = original.proxyBaseUrl;
   newResponseDef.fault = original.fault;
   newResponseDef.wasConfigured = original.wasConfigured;
   return newResponseDef;
 }
Ejemplo n.º 2
0
 public static ResponseDefinition browserProxy(Request originalRequest) {
   final ResponseDefinition response = new ResponseDefinition();
   response.browserProxyUrl = originalRequest.getAbsoluteUrl();
   return response;
 }
Ejemplo n.º 3
0
 public static ResponseDefinition notConfigured() {
   final ResponseDefinition response = new ResponseDefinition(HTTP_NOT_FOUND, (byte[]) null);
   response.wasConfigured = false;
   return response;
 }