Skip to content

Instantly share code, notes, and snippets.

@vyo
Last active June 12, 2017 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyo/b116e0099503d74082c341f5ec373dc4 to your computer and use it in GitHub Desktop.
Save vyo/b116e0099503d74082c341f5ec373dc4 to your computer and use it in GitHub Desktop.
@Mock
EchoUserProvider echoUserProviderMock;
@Override
protected Application configure() {
setup();
ResourceConfig resourceConfig = new ResourceConfig(
EchoController.class,
EchoUserProvider.class);
resourceConfig.register(new AbstractBinder() {
protected void configure() {
bind(echoController).to(EchoController.class);
bind(echoUserProviderMock).to(EchoUserProvider.class);
}
});
return resourceConfig;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment