ConfigurationsRestApi { @GET @Path("all") @ZeppelinApi public Response getAll() { ZeppelinConfiguration conf = notebook.getConf(); Map<String, String> configurations = conf.dumpConfigurations(conf, new ZeppelinConfiguration.ConfigurationKeyPredicate() { @Override public boolean apply(String key) { return !key.contains("password") && !key.equals(ZeppelinConfiguration .ConfVars .ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING .getVarName()); } } ); return new JsonResponse(Status.OK, "", configurations).build(); } ConfigurationsRestApi();  ConfigurationsRestApi(Notebook notebook); @GET @Path("all") @ZeppelinApi Response getAll(); @GET @Path("prefix/{prefix}") @ZeppelinApi Response getByPrefix(@PathParam("prefix") final String prefix);  }
@Test public void testGetAll() throws IOException { GetMethod get = httpGet("/configurations/all"); Map<String, Object> resp = gson.fromJson(get.getResponseBodyAsString(), new TypeToken<Map<String, Object>>(){}.getType()); Map<String, String> body = (Map<String, String>) resp.get("body"); assertTrue(body.size() > 0); assertTrue(Iterators.all(body.keySet().iterator(), new Predicate<String>() { @Override public boolean apply(String key) { return !key.contains("password"); } } )); }