### Question:
RdapRestTemplate { public RdapResponse execute(HttpMethodType httpMethod, URL url) throws RdapClientException { return doExecute(this.prepareExecute(url, httpMethod), null); }  RdapResponse execute(HttpMethodType httpMethod, URL url); RdapResponse execute(HttpMethodType httpMethod, URL url, String body); String getMediaType(); void setMediaType(String mediaType); int getConnectTimeout(); void setConnectTimeout(int connectTimeout); int getReadTimeout(); void setReadTimeout(int readTimeout);  }### Answer:
@Test public void test_execute_post200() { UpdateResponse response; int code; setContent200(); try { URL url = URLUtil.makeURLWithPath(this.url, "ip"); RdapResponse res = template .execute(HttpMethodType.POST, url, param); code = res.getResponseCode(); response = res.getResponseBody(UpdateResponse.class); } catch (RdapClientException e) { response = null; code = 0; } assertEquals(mockHttpServer.getRequestContentAsString(), param); assertEquals(code, 200); assertEquals(response.getHandle(), "ip-handle1"); assertEquals(response.getErrorCode(), 0); assertEquals(response.getSubErrorCode(), 0); assertEquals(response.getDescription().size(), 0); }
@Test public void test_execute_put200() { UpdateResponse response; int code; setContent200(); try { URL url = URLUtil.makeURLWithPath(this.url, "ip"); RdapResponse res = template.execute(HttpMethodType.PUT, url, param); code = res.getResponseCode(); response = res.getResponseBody(UpdateResponse.class); } catch (RdapClientException e) { response = null; code = 0; } assertEquals(code, 200); assertEquals(response.getHandle(), "ip-handle1"); assertEquals(response.getErrorCode(), 0); assertEquals(response.getSubErrorCode(), 0); assertEquals(response.getDescription().size(), 0); }
@Test public void test_execute_delete200() { UpdateResponse response; int code; setContent200(); try { URL url = URLUtil.makeURLWithPath(this.url, "ip", "ip-handle1"); RdapResponse res = template.execute(HttpMethodType.DELETE, url); code = res.getResponseCode(); response = res.getResponseBody(UpdateResponse.class); } catch (RdapClientException e) { response = null; code = 0; } assertEquals(code, 200); assertEquals(response.getHandle(), "ip-handle1"); assertEquals(response.getErrorCode(), 0); assertEquals(response.getSubErrorCode(), 0); assertEquals(response.getDescription().size(), 0); }
@Test public void test_execute_post400() { UpdateResponse response; int code; setContent400(); try { URL url = URLUtil.makeURLWithPath(this.url, "domain"); RdapResponse res = template.execute(HttpMethodType.DELETE, url, null); code = res.getResponseCode(); response = res.getResponseBody(UpdateResponse.class); } catch (RdapClientException e) { response = null; code = 0; } assertEquals(code, 400); assertEquals(response.getHandle(), "domain-1"); assertEquals(response.getErrorCode(), 400); assertEquals(response.getSubErrorCode(), 4002); assertEquals(response.getDescription().get(0), "Property can't be empty: domainName"); }