@Test public void simpleGetWithQueryPath() { Map<String, String[]> params = new HashMap<String, String[]>(); params.put("p", new String[] {"list/java.lang/type=Memory"}); JmxListRequest req = JmxRequestFactory.createGetRequest(null, params); assert req.getHttpMethod() == HttpMethod.GET : "GET by default"; assert req.getPath().equals("java.lang/type=Memory") : "Path extracted"; }
@Test public void simpleGetWithQueryPath() { Map<String, String> params = new HashMap<String, String>(); params.put("p", "list/java.lang/type=Memory"); JmxListRequest req = JmxRequestFactory.createGetRequest( null, new Configuration().getProcessingParameters(params)); assert req.getHttpMethod() == HttpMethod.GET : "GET by default"; assert req.getPath().equals("java.lang/type=Memory") : "Path extracted"; }