@@ -98,13 +98,6 @@ public void testGetMBeans()
98
98
assertMBeansResponse (jsonRequest (uriFor ("/v1/jmx/mbean" )));
99
99
}
100
100
101
- @ Test
102
- public void testGetMBeansJsonp ()
103
- throws Exception
104
- {
105
- assertMBeansResponse (jsonpRequest (uriFor ("/v1/jmx/mbean" )));
106
- }
107
-
108
101
private void assertMBeansResponse (JsonNode mbeans )
109
102
{
110
103
List <String > names = new ArrayList <>();
@@ -135,22 +128,6 @@ public void testGetMBean()
135
128
}
136
129
}
137
130
138
- @ Test
139
- public void testGetMBeanJsonp ()
140
- throws Exception
141
- {
142
- for (String mbeanName : getMBeanNames ()) {
143
- URI uri = uriBuilderFrom (uriFor ("/v1/jmx/mbean" ))
144
- .appendPath (mbeanName )
145
- .build ();
146
- JsonNode mbean = jsonpRequest (uri );
147
-
148
- JsonNode name = mbean .get ("objectName" );
149
- assertThat (name .isTextual ()).isTrue ();
150
- assertThat (name .asText ()).isEqualTo (mbeanName );
151
- }
152
- }
153
-
154
131
private JsonNode jsonRequest (URI uri )
155
132
throws IOException
156
133
{
@@ -163,26 +140,6 @@ private JsonNode jsonRequest(URI uri)
163
140
return new ObjectMapperProvider ().get ().readTree (response .getBody ());
164
141
}
165
142
166
- private JsonNode jsonpRequest (URI uri )
167
- throws IOException
168
- {
169
- uri = uriBuilderFrom (uri )
170
- .addParameter ("jsonp" , "test" )
171
- .build ();
172
- Request request = prepareGet ().setUri (uri ).build ();
173
- StringResponse response = client .execute (request , createStringResponseHandler ());
174
-
175
- assertThat (response .getStatusCode ()).as (response .getBody ()).isEqualTo (200 );
176
- assertContentType (response , JSON_UTF_8 );
177
-
178
- String jsonp = response .getBody ().trim ();
179
- assertThat (jsonp ).startsWith ("test(" );
180
- assertThat (jsonp ).endsWith (")" );
181
- jsonp = jsonp .substring (5 , jsonp .length () - 1 );
182
-
183
- return new ObjectMapperProvider ().get ().readTree (jsonp );
184
- }
185
-
186
143
private URI uriFor (String path )
187
144
{
188
145
return server .getBaseUrl ().resolve (path );
0 commit comments