Skip to content

Instantly share code, notes, and snippets.

@itaifrenkel
Created May 25, 2012 15:39
Show Gist options
  • Save itaifrenkel/2788844 to your computer and use it in GitHub Desktop.
Save itaifrenkel/2788844 to your computer and use it in GitHub Desktop.
Tomcat mock
AtomicLong counter = new AtomicLong(0);
// expose counter as a monitor
monitors ([
"counter" : {
return counter.get();
}])
// inject counter value
customCommands ([
"set" : { x-> counter.set(x as Long); }
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment