{"id":54569,"date":"2016-04-08T01:00:38","date_gmt":"2016-04-07T22:00:38","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=54569"},"modified":"2016-04-07T15:06:12","modified_gmt":"2016-04-07T12:06:12","slug":"accurest-stub-runner-released","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html","title":{"rendered":"AccuREST Stub Runner Released"},"content":{"rendered":"<p>It\u2019s been a good release time recently! I\u2019m blogging here at <a href=\"http:\/\/toomuchcoding.com\">Too Much Coding blog<\/a> more about releases then about any concrete topics ;)<\/p>\n<p>After releasing <a href=\"http:\/\/toomuchcoding.com\/blog\/2016\/03\/25\/spring-cloud-sleuth-rc1-deployed\/\">Spring Cloud Sleuth as a part of Brixton RC1<\/a> we have just released a version 1.0.4 of <a href=\"https:\/\/github.com\/Codearte\/accurest\">AccuREST<\/a>. We\u2019ve fixed a couple of bugs but we\u2019ve introduced a couple of big features including:<\/p>\n<ul>\n<li>Maven plugin support<\/li>\n<li><em>Stub Runner<\/em> functionality<\/li>\n<\/ul>\n<p>This post will describe the latter feature in more depth.<\/p>\n<h2>Introduction<\/h2>\n<p>I\u2019ve given quite a few talks about the library called <a href=\"https:\/\/github.com\/4finance\/micro-infra-spring\">Micro-Infra-Spring<\/a> where I presented how you can profit from the <em>Stub Runner<\/em> functionality. Since my leaving the company owning that repository, the project is almost not maintained at all. For quite a long time any development was done mostly by me and actually I was the author of most of the <em>Stub Runner\u2019s<\/em> code. Due to the aforementioned and the fact that <em>Stub Runner<\/em> is tightly coupled with AccuREST\u2019s stub generation feature I\u2019ve decided to migrate it to the AccuREST\u2019s repository.<\/p>\n<h2>AccuREST recap<\/h2>\n<p><em>Stub Runner<\/em> is tightly coupled with the concepts coming from AccuREST. For more information about AccuREST you can check my <a href=\"http:\/\/toomuchcoding.com\/blog\/categories\/accurest\/\">blog entries<\/a> or check <a href=\"https:\/\/github.com\/Codearte\/accurest\">AccuREST project on Github<\/a>. If you don\u2019t have a clue what that is I\u2019ll try to do a very fast recap.<\/p>\n<p>AccuREST is a <a href=\"http:\/\/martinfowler.com\/articles\/consumerDrivenContracts.html\">Consumer Driven Contracts<\/a> verifier in which you define the contract of your API via a Groovy DSL. From that DSL, on the server side, tests are created to check if your contract is telling the truth. From the <em>Stub Runner\u2019s<\/em> perspective more interesting is the client side. For the client side AccuREST generates WireMock stubs from the provided DSL so that the clients of that API can be provided with reliable stubs.<\/p>\n<h2>What is Stub Runner?<\/h2>\n<p>Now that we remember what AccuREST does we can take a look in more depth at <em>Stub Runner<\/em>. Let\u2019s assume that we have a following flow of services (btw. <a href=\"http:\/\/cloud.spring.io\/spring-cloud-sleuth\/spring-cloud-sleuth.html\">this is a screenshot from Zipkin integrated with Spring Cloud Sleuth<\/a> )<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest.png\" rel=\"attachment wp-att-54592\"><img decoding=\"async\" class=\"aligncenter wp-image-54592 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest-1024x218.png\" alt=\"dependencies_accurest\" width=\"620\" height=\"132\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest-1024x218.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest-300x64.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest-768x164.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/dependencies_accurest.png 1336w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>Let\u2019s imagine ourselves as developers of the <em>service2<\/em> &#8211; the one that calls <em>service3<\/em> and <em>service4<\/em>. Since we\u2019re doing the CDC (<a href=\"http:\/\/martinfowler.com\/articles\/consumerDrivenContracts.html\">Consumer Driven Contracts<\/a>) approach let\u2019s assume that the stubs of <em>service3<\/em> and <em>service4<\/em> got already deployed to some Maven repository.<\/p>\n<p>If I\u2019m writing integration tests of <em>service2<\/em> I\u2019ll for sure have some points of interaction with <em>service3<\/em> and <em>service4<\/em>. Most likely in the majority of cases I\u2019ll just mock those interactions in my code but it would be valuable to have a real HTTP call done to the other application. Of course I don\u2019t want to download both services and run them only for integration tests &#8211; that would be an overkill. That\u2019s why the most preferable solution at this point would be to run the stubs of my collaborators.<\/p>\n<p>Since I\u2019m too lazy to do things manually I\u2019d prefer the stubs to be automatically downloaded for me, the WireMock servers started and fed with the stub definitions.<\/p>\n<p>And that\u2019s exactly what <em>Stub Runner<\/em> can do for you!<\/p>\n<h2>How does it work?<\/h2>\n<h4>Concept<\/h4>\n<p><a href=\"https:\/\/github.com\/Codearte\/accurest\/wiki\/8.-Stub-Runner\">Stub Runner<\/a> at its core is using Groovy\u2019s Grape mechanism to download the stubs from a given Maven repository. Next it unpacks them to a temporary folder. Let\u2019s assume that you have the following structure of your WireMock stubs inside the stub JAR (example for a <code>service3-stubs.jar<\/code>)<\/p>\n<pre class=\"brush:java\"> \r\n\u251c\u2500\u2500 META-INF\r\n\u2502   \u2514\u2500\u2500 MANIFEST.MF\r\n\u2514\u2500\u2500 mappings\r\n    \u2514\u2500\u2500 service3\r\n        \u251c\u2500\u2500 shouldMarkClientAsFraud.json\r\n        \u251c\u2500\u2500 notAWireMockMapping.json\r\n        \u2514\u2500\u2500 shouldSayHello.json<\/pre>\n<p><em>Stub Runner<\/em> will scan the whole unpacked JAR for any <code>.json<\/code> files. There is a convention that stub definitions are placed under the <code>mappings<\/code> folder. So it will pick <code>shouldMarkClientAsFraud.json<\/code>, <code>notAWireMockMapping.json<\/code> and <code>shouldSayHello.json<\/code> files.<\/p>\n<p>Next, a WireMock instance is started for each dependency and every found JSON is attempted to be parsed as a WireMock stub definition. Any exceptions at this point are ignored (so assuming that <code>notAWireMockMapping.json<\/code> is not a valid WireMock definition, the exception will be suppressed). In our scenario 2 WireMock servers will be started &#8211; one for <code>service3<\/code> and one for <code>service4<\/code>.<\/p>\n<p>That way you don\u2019t have to copy the stubs manually. The stubs are centralized since they are stored in a Maven repository. It\u2019s extremely important cause <em>Stub Runner<\/em> downloads always the newest version of the stubs so you can be sure that your tests will break the moment someone does an incompatible change.<\/p>\n<h4>API<\/h4>\n<p>From the developer\u2019s perspective there are only a handful of <em>Stub Runner\u2019s<\/em> classes that should be used. In the majority of cases you will use the following ones:<\/p>\n<h2>StubFinder<\/h2>\n<p>An interface that allows you to find the URL of the started WireMock instance. You can find that URL by passing the Ivy notation (<code>groupId:artifactId<\/code>) or just the <code>artifactId<\/code> &#8211; <em>Stub Runner<\/em> will try to take care of the rest.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">interface StubFinder {\r\n  \/**\r\n   * For the given groupId and artifactId tries to find the matching\r\n   * URL of the running stub.\r\n   *\r\n   * @param groupId - might be null. In that case a search only via artifactId takes place\r\n   * @return URL of a running stub or null if not found\r\n   *\/\r\n  URL findStubUrl(String groupId, String artifactId)\r\n\r\n  \/**\r\n   * For the given Ivy notation {@code groupId:artifactId} tries to find the matching\r\n   * URL of the running stub. You can also pass only {@code artifactId}.\r\n   *\r\n   * @param ivyNotation - Ivy representation of the Maven artifact\r\n   * @return URL of a running stub or null if not found\r\n   *\/\r\n  URL findStubUrl(String ivyNotation)\r\n\r\n  \/**\r\n   * Returns all running stubs\r\n   *\/\r\n  RunningStubs findAllRunningStubs()\r\n}<\/pre>\n<h2>RunningStubs<\/h2>\n<p>A structure representing the already running stubs. Give you some helper methods to retrieve Ivy representation of a particular stub, find a port for a stub etc.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/running_stubs.png\" rel=\"attachment wp-att-54593\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-54593\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/running_stubs.png\" alt=\"running_stubs\" width=\"665\" height=\"270\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/running_stubs.png 665w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/running_stubs-300x122.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/p>\n<h2>StubRunning<\/h2>\n<p>A contract for classes that can run the stubs:<\/p>\n<pre class=\"brush:java\">interface StubRunning extends Closeable, StubFinder {\r\n  \/**\r\n   * Runs the stubs and returns the {@link RunningStubs}\r\n   *\/\r\n  RunningStubs runStubs()\r\n\r\n}<\/pre>\n<h2>StubRunner<\/h2>\n<p>Represents a single instance of ready-to-run stubs. It can run the stubs and will return the running instance of WireMock wrapped in <code>RunningStubs<\/code> class. Since it\u2019s implementing <code>StubFinder<\/code> can also be queried if the current groupid and artifactid are matching the corresponding running stub.<\/p>\n<h2>BatchStubRunner<\/h2>\n<p>If you have multiple services for which you want to run the WireMocks with stubs it\u2019s enough to use <code>BatchStubRunner<\/code>. It iterates over the given <code>Iterable<\/code> of <code>StubRunner<\/code> and executes the logic on each of them.<\/p>\n<h2>Running Stub Runner<\/h2>\n<p>In all the examples below let\u2019s assume that the stubs are stored in the Maven repository available under <code>http:\/\/toomuchcoding.com<\/code> URL. As <em>service2<\/em> I\u2019d like to download the stubs of <code>com.toomuchcoding:service3<\/code> and <code>com.toomuchcoding:service4<\/code> services.<\/p>\n<h4>Stub Runner as a fat JAR<\/h4>\n<h2>How to use it?<\/h2>\n<p><em>Stub Runner<\/em> comes with a main class (<code>io.codearte.accurest.stubrunner.StubRunnerMain<\/code>) which you can run with the following options:<\/p>\n<pre class=\"brush:java\">-maxp (--maxPort) N            : Maximum port value to be assigned to the\r\n                                  Wiremock instance. Defaults to 15000\r\n                                  (default: 15000)\r\n -minp (--minPort) N            : Minimal port value to be assigned to the\r\n                                  Wiremock instance. Defaults to 10000\r\n                                  (default: 10000)\r\n -s (--stubs) VAL               : Comma separated list of Ivy representation of\r\n                                  jars with stubs. Eg. groupid:artifactid1,group\r\n                                  id2:artifactid2:classifier\r\n -sr (--stubRepositoryRoot) VAL : Location of a Jar containing server where you\r\n                                  keep your stubs (e.g. http:\/\/nexus.net\/content\r\n                                  \/repositories\/repository)\r\n -ss (--stubsSuffix) VAL        : Suffix for the jar containing stubs (e.g.\r\n                                  'stubs' if the stub jar would have a 'stubs'\r\n                                  classifier for stubs: foobar-stubs ).\r\n                                  Defaults to 'stubs' (default: stubs)\r\n -wo (--workOffline)            : Switch to work offline. Defaults to 'false'\r\n                                  (default: false)<\/pre>\n<p>You can run that main class from IDE or build yourself a fat JAR. To do that just call the following command:<\/p>\n<pre class=\"brush:java\">.\/gradlew stub-runner-root:stub-runner:shadowJar -PfatJar<\/pre>\n<p>Then inside the <code>build\/lib<\/code> there will be a fat JAR with classifier <code>fatJar<\/code> waiting for you to execute.<\/p>\n<p>Coming back to our example once the fat JAR is built I would just call the following command the retrieve the stubs of <em>service3<\/em> and <em>service4<\/em> from the Maven repository available at <code>http:\/\/toomuchcoding.com<\/code>.<\/p>\n<pre class=\"brush:bash\">java -jar stub-runner-1.0.4-SNAPSHOT-fatJar.jar -sr http:\/\/toomuchcoding.com -s com.toomuchcoding:service3:stubs,com.toomuchcoding.service4<\/pre>\n<h2>When to use it?<\/h2>\n<p>Running <em>Stub Runner<\/em> as a main class makes most sense when you\u2019re running some fast smoke tests on a deployed application where you don\u2019t want to download and run all the collaborators of that application. For more rationale behind such an approach you can check my article about <a href=\"\/blog\/2015\/09\/27\/microservice-deployment\/\">Microservice Deployment<\/a><\/p>\n<h4>Stub Runner JUnit Rule<\/h4>\n<h2>How to use it?<\/h2>\n<p>You can use the <em>Stub Runner\u2019s<\/em> JUnit rule to automatically download and run the stubs during your tests. The <code>AccurestRule<\/code> implements the <code>StubFinder<\/code> interface thus you can easily find the URLs of the services that you\u2019re interested in.<\/p>\n<p>This is how you could do it with Spock:<\/p>\n<pre class=\"brush:java\">class SomeSpec extends Specification {\r\n\r\n  @ClassRule @Shared AccurestRule rule = new AccurestRule()\r\n      .repoRoot('http:\/\/toomuchcoding.com')\r\n      .downloadStub(\"com.toomuchcoding\", \"service3\")\r\n      .downloadStub(\"com.toomuchcoding:service4\")\r\n\r\n  def 'should do something useful when service3 is called'() {\r\n        given:\r\n            URL service3Url = rule.findStubUrl('com.toomuchcoding', 'service3')\r\n        expect:\r\n            somethingUseful(service3Url)\r\n    }\r\n\r\n  def 'should do something even more useful when service4 is called'() {\r\n        given:\r\n            URL service4Url = rule.findStubUrl('service4')\r\n        expect:\r\n            somethingMoreUseful(service4Url)\r\n    }\r\n}<\/pre>\n<p>or with plain Java JUnit:<\/p>\n<pre class=\"brush:java\">public class SomeTest {\r\n\r\n  @ClassRule public static AccurestRule rule = new AccurestRule()\r\n      .repoRoot(\"http:\/\/toomuchcoding.com\")\r\n      .downloadStub(\"com.toomuchcoding\", \"service3\")\r\n      .downloadStub(\"com.toomuchcoding:service4\");\r\n\r\n  @Test\r\n  public void should_do_something_useful_when_service3_is_called() {\r\n        URL service3Url = rule.findStubUrl(\"com.toomuchcoding\", \"service3\");\r\n\r\n        somethingUseful(service3Url);\r\n  }\r\n\r\n  @Test\r\n  public void should_do_something_even_more_useful_when_service4_is_called() {\r\n        URL service4Url = rule.findStubUrl(\"service4\");\r\n\r\n        somethingMoreUseful(service4Url);\r\n  }\r\n}<\/pre>\n<h2>When to use it?<\/h2>\n<p>You can use this rule in any place you want to if we don\u2019t provide any integration with an existing framework.<\/p>\n<h4>Stub Runner Spring<\/h4>\n<h2>How to use it?<\/h2>\n<p>You can use the <em>Stub Runner\u2019s<\/em> Spring configuration to download the stubs of your collaborators and run the WireMock server upon Spring context booting. We\u2019re providing the <code>StubRunnerConfiguration<\/code> that you can import in your tests. In that configuration we\u2019re registering a <code>StubFinder<\/code> bean that you can autowire in your tests.<\/p>\n<p>Having the following <code>application.yaml<\/code> file:<\/p>\n<pre class=\"brush:bash\">stubrunner.stubs.repository.root: http:\/\/toomuchcoding.com\r\nstubrunner.stubs.ids: com.toomuchcoding:service3:stubs,com.toomuchcoding.service4<\/pre>\n<p>This is how you could do it with Spock<\/p>\n<pre class=\"brush:java\">@ContextConfiguration(classes = Config, loader = SpringApplicationContextLoader)\r\nclass StubRunnerConfigurationSpec extends Specification {\r\n\r\n  @Autowired StubFinder stubFinder\r\n\r\n  def 'should do something useful when service3 is called'() {\r\n      given:\r\n          URL service3Url = stubFinder.findStubUrl('com.toomuchcoding', 'service3')\r\n      expect:\r\n          somethingUseful(service3Url)\r\n  }\r\n\r\n  def 'should do something even more useful when service4 is called'() {\r\n      given:\r\n          URL service4Url = stubFinder.findStubUrl('service4')\r\n      expect:\r\n          somethingMoreUseful(service4Url)\r\n  }\r\n\r\n  @Configuration\r\n  @Import(StubRunnerConfiguration)\r\n  @EnableAutoConfiguration\r\n  static class Config {}\r\n\r\n}<\/pre>\n<h2>When to use it?<\/h2>\n<p>In your tests if you have Spring and don\u2019t have Spring Cloud. Also you can add it in compile time (of course you would have to add some Spring profiles so as not to run it on production) to profit from a \u201cdeveloper\u201d mode of running microservices. That means that if you boot up your application to click around it &#8211; all the stubs around you would have already been downloaded and started.<\/p>\n<h4>Stub Runner Spring Cloud<\/h4>\n<h2>How to use it?<\/h2>\n<p>You can use the <em>Stub Runner\u2019s<\/em> Spring Cloud configuration to profit from the stubbed collaborators when using Spring Cloud\u2019s abstractions over service discovery and when you\u2019re using Netflix Ribbon. <em>Stub Runner Spring Cloud<\/em> configuration is an <code>AutoConfiguration<\/code> so it\u2019s automatically started for you.<\/p>\n<p>Let\u2019s assume that you\u2019re referring to <em>service3<\/em> as <code>service3<\/code> in your code and to <em>service4<\/em> as <code>shouldMapThisNameToService4<\/code>. That means that you\u2019re using for example the <code>@LoadBalanced<\/code> <code>RestTemplate<\/code> in the following way (don\u2019t use field injection as I do in this example!!):<\/p>\n<pre class=\"brush:java\">@Component\r\nclass SomeClass {\r\n\r\n  @Autowired @LoadBalanced RestTemplate restTemplate\r\n\r\n  void doSth() {\r\n    \/\/ code...\r\n    String service3Response = restTemplate.getForObject('http:\/\/service3\/name', String)\r\n    String service4Response = restTemplate.getForObject('http:\/\/shouldMapThisNameToService4\/name', String)\r\n    \/\/ more code...\r\n  }\r\n\r\n}<\/pre>\n<p>If the service Id that you\u2019re using to call other services maps exactly to the name of the artifact Id in a Maven repository then you\u2019re lucky and don\u2019t have to do anything to find your running stubs. If however that\u2019s not the case &#8211; don\u2019t worry, you\u2019ll just have to map it yourself.<\/p>\n<p>The <code>stubrunner.stubs.idsToServiceIds<\/code> property is the root path to a map in which the <em>key<\/em> is the <em>artifactID<\/em> of the downloaded stub and the <em>value<\/em> is the <em>serviceId<\/em> used in the code.<\/p>\n<p>Having the following <code>application.yaml<\/code> file:<\/p>\n<pre class=\"brush:bash\">stubrunner.stubs.repository.root: http:\/\/toomuchcoding.com\r\nstubrunner.stubs.ids: com.toomuchcoding:service3:stubs,com.toomuchcoding.service4\r\n\r\nstubrunner.stubs.idsToServiceIds:\r\n  service4: shouldMapThisNameToService4<\/pre>\n<p>This is how you could do it with Spock<\/p>\n<pre class=\"brush:java\">@ContextConfiguration(classes = Config, loader = SpringApplicationContextLoader)\r\nclass StubRunnerConfigurationSpec extends Specification {\r\n\r\n  @Autowired SomeClass someClass\r\n\r\n  def 'should not explode'() {\r\n      when:\r\n          someClass.doSth()\r\n      expect:\r\n          noExceptionThrown()\r\n  }\r\n\r\n  @Configuration\r\n  @EnableAutoConfiguration\r\n  static class Config {}\r\n\r\n}<\/pre>\n<h2>When to use it?<\/h2>\n<p>When you\u2019re using Spring Cloud. You can profit from <code>Stub Runner Spring Cloud<\/code> also in \u201cdeveloper\u201d mode as presented in the <code>Stub Runner Spring<\/code> section.<\/p>\n<h4>Additional Configuration Options<\/h4>\n<p>You can set the default value of the Maven repository by means of a system property:<\/p>\n<pre class=\"brush:java\">-Dstubrunner.stubs.repository.root=http:\/\/your.maven.repo.com<\/pre>\n<p>The list of configurable properties contains:<\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Default value<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>stubrunner.port.range.min<\/td>\n<td>10000<\/td>\n<td>Minimal value of a port for a WireMock server<\/td>\n<\/tr>\n<tr>\n<td>stubrunner.port.range.max<\/td>\n<td>15000<\/td>\n<td>Maximum value of a port for a WireMock server<\/td>\n<\/tr>\n<tr>\n<td>stubrunner.stubs.repository.root<\/td>\n<td><\/td>\n<td>Address to your M2 repo (will point to local M2 repo if none is provided)<\/td>\n<\/tr>\n<tr>\n<td>stubrunner.stubs.classifier<\/td>\n<td>stubs<\/td>\n<td>Default classifier for the JARs containing stubs<\/td>\n<\/tr>\n<tr>\n<td>stubrunner.work-offline<\/td>\n<td>false<\/td>\n<td>Should try to connect to any repo to download stubs (useful if there\u2019s no internet)<\/td>\n<\/tr>\n<tr>\n<td>stubrunner.stubs<\/td>\n<td><\/td>\n<td>Default comma separated list of stubs to download<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Summary<\/h2>\n<p><em>Stub Runner<\/em>:<\/p>\n<ul>\n<li>Has already proven to be a very useful tool when doing CDC.<\/li>\n<li>Was battle tested and more companies are declaring their interest in using it.<\/li>\n<li>Helps you produce an API that should make both sides (server and the client) equally happy (or unhappy but still they\u2019re both equal in their emotions ;) ).<\/li>\n<li>Is language \/ technology agnostic &#8211; you can run it as a fat JAR, use it with Spring, Guice or whatever you want.<\/li>\n<li>Helps you speed up the feedback cycle both from the API design and the compatibility perspective.<\/li>\n<\/ul>\n<h2>Links<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/Codearte\/accurest\">AccuREST Github Repository<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Codearte\/accurest\/wiki\/8.-Stub-Runner\">Stub Runner WIKI<\/a><\/li>\n<li><a href=\"https:\/\/gitter.im\/Codearte\/accurest\">AccuREST Gitter<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/toomuchcoding.com\/blog\/2016\/04\/06\/accurest-stubrunner-released\/\">AccuREST Stub Runner Released<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a> Marcin Grzejszczak at the <a href=\"http:\/\/toomuchcoding.com\/\">Blog for coding addicts<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing Spring Cloud Sleuth as a part of Brixton RC1 we have just released a version 1.0.4 of AccuREST. We\u2019ve fixed a couple of bugs but we\u2019ve introduced a couple &hellip;<\/p>\n","protected":false},"author":417,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-54569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AccuREST Stub Runner Released - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AccuREST Stub Runner Released - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/TooMuchCoding\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-07T22:00:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Marcin Grzejszczak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/MGrzejszczak\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marcin Grzejszczak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html\"},\"author\":{\"name\":\"Marcin Grzejszczak\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c4d5fb6575182ae8a42411f4947c6b54\"},\"headline\":\"AccuREST Stub Runner Released\",\"datePublished\":\"2016-04-07T22:00:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html\"},\"wordCount\":1786,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html\",\"name\":\"AccuREST Stub Runner Released - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2016-04-07T22:00:38+00:00\",\"description\":\"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2016\\\/04\\\/accurest-stub-runner-released.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"AccuREST Stub Runner Released\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c4d5fb6575182ae8a42411f4947c6b54\",\"name\":\"Marcin Grzejszczak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g\",\"caption\":\"Marcin Grzejszczak\"},\"description\":\"Senior Java Developer with team building and managing skills. Enthusiast of JVM languages (Groovy, Scala) and clean coding\",\"sameAs\":[\"http:\\\/\\\/toomuchcoding.com\\\/\",\"http:\\\/\\\/www.facebook.com\\\/TooMuchCoding\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/marcin-grzejszczak\\\/19\\\/651\\\/155\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/MGrzejszczak\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/marcin-grzejszczak\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AccuREST Stub Runner Released - Java Code Geeks","description":"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html","og_locale":"en_US","og_type":"article","og_title":"AccuREST Stub Runner Released - Java Code Geeks","og_description":"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing","og_url":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/www.facebook.com\/TooMuchCoding","article_published_time":"2016-04-07T22:00:38+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Marcin Grzejszczak","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/MGrzejszczak","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Marcin Grzejszczak","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html"},"author":{"name":"Marcin Grzejszczak","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c4d5fb6575182ae8a42411f4947c6b54"},"headline":"AccuREST Stub Runner Released","datePublished":"2016-04-07T22:00:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html"},"wordCount":1786,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html","url":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html","name":"AccuREST Stub Runner Released - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2016-04-07T22:00:38+00:00","description":"It\u2019s been a good release time recently! I\u2019m blogging here at Too Much Coding blog more about releases then about any concrete topics ;) After releasing","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2016\/04\/accurest-stub-runner-released.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"AccuREST Stub Runner Released"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c4d5fb6575182ae8a42411f4947c6b54","name":"Marcin Grzejszczak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1cda3e9f5bb5ca536ed2d4dd27e82290dd1ab3566c586a6b6be9eed159b7fe1e?s=96&d=mm&r=g","caption":"Marcin Grzejszczak"},"description":"Senior Java Developer with team building and managing skills. Enthusiast of JVM languages (Groovy, Scala) and clean coding","sameAs":["http:\/\/toomuchcoding.com\/","http:\/\/www.facebook.com\/TooMuchCoding","http:\/\/www.linkedin.com\/pub\/marcin-grzejszczak\/19\/651\/155","https:\/\/x.com\/http:\/\/twitter.com\/MGrzejszczak"],"url":"https:\/\/www.javacodegeeks.com\/author\/marcin-grzejszczak"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/54569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/417"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=54569"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/54569\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=54569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=54569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=54569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}