{"action":"created","issue":{"url":"https://api.github.com/repos/betamaxteam/betamax/issues/136","repository_url":"https://api.github.com/repos/betamaxteam/betamax","labels_url":"https://api.github.com/repos/betamaxteam/betamax/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/betamaxteam/betamax/issues/136/comments","events_url":"https://api.github.com/repos/betamaxteam/betamax/issues/136/events","html_url":"https://github.com/betamaxteam/betamax/issues/136","id":33273263,"number":136,"title":"proxyserver start address already in use","user":{"login":"marky-mark","id":1014814,"avatar_url":"https://avatars.githubusercontent.com/u/1014814?v=3","gravatar_id":"","url":"https://api.github.com/users/marky-mark","html_url":"https://github.com/marky-mark","followers_url":"https://api.github.com/users/marky-mark/followers","following_url":"https://api.github.com/users/marky-mark/following{/other_user}","gists_url":"https://api.github.com/users/marky-mark/gists{/gist_id}","starred_url":"https://api.github.com/users/marky-mark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marky-mark/subscriptions","organizations_url":"https://api.github.com/users/marky-mark/orgs","repos_url":"https://api.github.com/users/marky-mark/repos","events_url":"https://api.github.com/users/marky-mark/events{/privacy}","received_events_url":"https://api.github.com/users/marky-mark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/betamaxteam/betamax/labels/triage","name":"triage","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-05-11T23:31:56Z","updated_at":"2016-02-17T14:02:00Z","closed_at":null,"body":"Seems that on initialisation\r\n\r\nProxyServer proxyServer = new ProxyServer(recorder);\r\n\r\nThe proxy server starts on 5555 but isRunning() is false. Stack trace seen at the end occurs if proxyServer.start() is called. Tried without the start() and the mocked response is never played \r\n\r\n\r\nThe code\r\n\r\npublic class BetaMaxTest {\r\n\r\n    public static final String EXCHANGE_RATE_API_URL = \"http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml\";\r\n\r\n    @Rule\r\n    public Recorder recorder = new Recorder();\r\n\r\n    private ProxyServer proxyServer = new ProxyServer(recorder);\r\n\r\n    private DefaultHttpClient client;\r\n\r\n    @Before\r\n    public void setUp() throws Exception {\r\n        client = new DefaultHttpClient();\r\n    }\r\n\r\n    @Betamax(tape = \"new-euro-exchange-response\")\r\n    @Test\r\n    @Betamax(tape = \"euro-exchange-response\",\r\n            mode = TapeMode.READ_ONLY)\r\n    public void shouldReplayExchangeRateResponse() throws Exception {\r\n//        BetamaxRoutePlanner.configure(client);\r\n        proxyServer.start();  <<-------Exception here\r\n        HttpGet getMethod = new HttpGet(EXCHANGE_RATE_API_URL);\r\n        HttpResponse response = client.execute(getMethod);\r\n        assertThat(response.getStatusLine().getStatusCode(), is(201));\r\n        proxyServer.stop();\r\n    }\r\n}\r\n\r\n\r\nNote: I did an analysis of proxyServer.isRunning() and it is False!\r\n\r\n\r\nget this stack trace\r\n\r\nMultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]\r\n\tat org.eclipse.jetty.server.Server.doStart(Server.java:251)\r\n\tat org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)\r\n\tat org.eclipse.jetty.util.component.LifeCycle$start.call(Unknown Source)\r\n\tat co.freeside.betamax.proxy.jetty.SimpleServer.start(SimpleServer.groovy:73)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.super$3$start(ProxyServer.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.start(ProxyServer.groovy:56)\r\n\tat BetaMaxTest.shouldReplayExchangeRateResponse(BetaMaxTest.java:46)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)\r\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)\r\n\tat org.junit.internal.runners.statements.RunBefores$evaluate.call(Unknown Source)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy:186)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder.withTape(Recorder.groovy:168)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)\r\n\tat co.freeside.betamax.Recorder.this$dist$invoke$2(Recorder.groovy)\r\n\tat co.freeside.betamax.Recorder$1.methodMissing(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:828)\r\n\tat groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1120)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1073)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)\r\n\tat co.freeside.betamax.Recorder$1.evaluate(Recorder.groovy:185)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:128)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:24)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:157)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\r\njava.net.BindException: Address already in use\r\n\tat sun.nio.ch.Net.bind(Native Method)\r\n\tat sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)\r\n\tat sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)\r\n\tat org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:170)\r\n\tat org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:356)\r\n\tat org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:248)\r\n\tat org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)\r\n\tat org.eclipse.jetty.server.Server.doStart(Server.java:269)\r\n\tat org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)\r\n\tat org.eclipse.jetty.util.component.LifeCycle$start.call(Unknown Source)\r\n\tat co.freeside.betamax.proxy.jetty.SimpleServer.start(SimpleServer.groovy:73)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.super$3$start(ProxyServer.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.start(ProxyServer.groovy:56)\r\n\tat BetaMaxTest.shouldReplayExchangeRateResponse(BetaMaxTest.java:46)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)\r\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)\r\n\tat org.junit.internal.runners.statements.RunBefores$evaluate.call(Unknown Source)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy:186)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder.withTape(Recorder.groovy:168)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)\r\n\tat co.freeside.betamax.Recorder.this$dist$invoke$2(Recorder.groovy)\r\n\tat co.freeside.betamax.Recorder$1.methodMissing(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:828)\r\n\tat groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1120)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1073)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)\r\n\tat co.freeside.betamax.Recorder$1.evaluate(Recorder.groovy:185)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:128)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:24)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:157)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\r\njava.net.BindException: Address already in use\r\n\tat sun.nio.ch.Net.bind(Native Method)\r\n\tat sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)\r\n\tat sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)\r\n\tat org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:170)\r\n\tat org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:356)\r\n\tat org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:248)\r\n\tat org.eclipse.jetty.server.ssl.SslSelectChannelConnector.doStart(SslSelectChannelConnector.java:644)\r\n\tat org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)\r\n\tat org.eclipse.jetty.server.Server.doStart(Server.java:269)\r\n\tat org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)\r\n\tat org.eclipse.jetty.util.component.LifeCycle$start.call(Unknown Source)\r\n\tat co.freeside.betamax.proxy.jetty.SimpleServer.start(SimpleServer.groovy:73)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.super$3$start(ProxyServer.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)\r\n\tat co.freeside.betamax.proxy.jetty.ProxyServer.start(ProxyServer.groovy:56)\r\n\tat BetaMaxTest.shouldReplayExchangeRateResponse(BetaMaxTest.java:46)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)\r\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)\r\n\tat org.junit.internal.runners.statements.RunBefores$evaluate.call(Unknown Source)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy:186)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)\r\n\tat co.freeside.betamax.Recorder$_1_evaluate_closure1.doCall(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)\r\n\tat co.freeside.betamax.Recorder.withTape(Recorder.groovy:168)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1071)\r\n\tat org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)\r\n\tat co.freeside.betamax.Recorder.this$dist$invoke$2(Recorder.groovy)\r\n\tat co.freeside.betamax.Recorder$1.methodMissing(Recorder.groovy)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\r\n\tat groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:828)\r\n\tat groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1120)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1073)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:901)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)\r\n\tat co.freeside.betamax.Recorder$1.evaluate(Recorder.groovy:185)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:128)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:24)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:300)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:157)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/betamaxteam/betamax/issues/comments/185218422","html_url":"https://github.com/betamaxteam/betamax/issues/136#issuecomment-185218422","issue_url":"https://api.github.com/repos/betamaxteam/betamax/issues/136","id":185218422,"user":{"login":"hvdnew","id":5625912,"avatar_url":"https://avatars.githubusercontent.com/u/5625912?v=3","gravatar_id":"","url":"https://api.github.com/users/hvdnew","html_url":"https://github.com/hvdnew","followers_url":"https://api.github.com/users/hvdnew/followers","following_url":"https://api.github.com/users/hvdnew/following{/other_user}","gists_url":"https://api.github.com/users/hvdnew/gists{/gist_id}","starred_url":"https://api.github.com/users/hvdnew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvdnew/subscriptions","organizations_url":"https://api.github.com/users/hvdnew/orgs","repos_url":"https://api.github.com/users/hvdnew/repos","events_url":"https://api.github.com/users/hvdnew/events{/privacy}","received_events_url":"https://api.github.com/users/hvdnew/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T14:01:59Z","updated_at":"2016-02-17T14:01:59Z","body":"Got it working after some workaround.\r\n\r\nWorking code here..\r\n [https://github.com/hvdnew/beyonic-java-master/blob/master/src/test/java/com/beyonic/test/PaymentTest.java](url)"}}