JmxRequest { public RequestType getType() { return type; } protected  JmxRequest(RequestType pType, List<String> pPathParts, ProcessingParameters pProcessingParams);  JmxRequest(Map<String, ?> pMap, ProcessingParameters pInitParams); private  JmxRequest(RequestType pType, HttpMethod pMethod, List<String> pPathParts, ProcessingParameters pProcessingParams); RequestType getType(); String getParameter(ConfigKey pConfigKey); int getParameterAsInt(ConfigKey pConfigKey); Boolean getParameterAsBool(ConfigKey pConfigKey); ProxyTargetConfig getTargetConfig(); HttpMethod getHttpMethod(); ValueFaultHandler getValueFaultHandler(); List<String> getPathParts(); String getPath(); JSONObject toJSON();  }
@Test public void versionRequest() { for (JmxVersionRequest req : new JmxVersionRequest[] { (JmxVersionRequest) JmxRequestFactory.createGetRequest("version/java.lang:type=Memory", procParams), (JmxVersionRequest) JmxRequestFactory.createPostRequest( createMap("type", "version", "path", "java.lang:type=Memory"),procParams) }) { assertEquals(req.getType(),RequestType.VERSION); verify(req,"type","version"); } }
@Test public void searchRequest() { for (JmxSearchRequest req : new JmxSearchRequest[] { (JmxSearchRequest) JmxRequestFactory.createGetRequest("search/java.lang:*", procParams), (JmxSearchRequest) JmxRequestFactory.createPostRequest( createMap("type", "search", "mbean", "java.lang:*"),procParams) }) { assertEquals(req.getType(),RequestType.SEARCH); assertEquals(req.getObjectName().getCanonicalName(),"java.lang:*"); assertTrue(req.getObjectName().isPattern()); verify(req,"type","search"); verify(req,"mbean","java.lang:*"); } }