Add missing test for invalid path
@@ -199,6 +199,13 @@ public class MetricsHandlerTest {
assertEquals("custom-val", dummy1Metrics.dimensions.get("consumer-dim"));
}
+ @Test
+ public void invalid_path_yields_error_response() throws Exception {
+ String response = testDriver.sendRequest(V1_URI + "/invalid").readAll();
+ JSONObject root = new JSONObject(response);
+ assertTrue(root.has("error"));
+ }
+
private void assertDownServiceHealth(String consumer) {
GenericJsonModel jsonModel = getResponseAsJsonModel(consumer);
