FunctionsResource { @GET @Produces(MediaType.APPLICATION_JSON) public Response getAllFunctions() { if (LOG.isDebugEnabled()) { LOG.debug("Client sent a retrieve all functions request."); } Response response = null; try { initializeContext(); JerseyResourceDelegateContextKey<String> databaseNameKey = JerseyResourceDelegateContextKey.valueOf(databaseNameKeyName, String.class); context.put(databaseNameKey, databaseName); response = JerseyResourceDelegateUtil.runJerseyResourceDelegate( new GetAllFunctionsDelegate(), application, context, LOG); } catch (Throwable e) { LOG.error(e.getMessage(), e); response = ResourcesUtil.createExceptionResponse(null, e.getMessage()); } return response; }  @GET @Produces(MediaType.APPLICATION_JSON) Response getAllFunctions();  }
@Test public void testGetAllFunctions() throws Exception { List<FunctionSignature> functionSignatures = restClient.target(functionsURI) .request().get(new GenericType<List<FunctionSignature>>(List.class)); assertNotNull(functionSignatures); assertTrue(functionSignatures.size() > 0); }