ConfigurationsRestApi extends AbstractRestApi { @GET @Path("all") @ZeppelinApi public Response getAll() { try { Map<String, String> properties = configurationService.getAllProperties(getServiceContext(), new RestServiceCallback<>()); return new JsonResponse(Status.OK, "", properties).build(); } catch (IOException e) { return new JsonResponse(Status.INTERNAL_SERVER_ERROR, "Fail to get configuration", e).build(); } } @Inject  ConfigurationsRestApi(
          AuthenticationService authenticationService, ConfigurationService configurationService); @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"); } } )); }