{"action":"created","issue":{"url":"https://api.github.com/repos/DiUS/pact-jvm/issues/117","labels_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/117/comments","events_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/117/events","html_url":"https://github.com/DiUS/pact-jvm/issues/117","id":72279486,"number":117,"title":"Using multiple mock providers","user":{"login":"sbruno","id":39304,"avatar_url":"https://avatars.githubusercontent.com/u/39304?v=3","gravatar_id":"","url":"https://api.github.com/users/sbruno","html_url":"https://github.com/sbruno","followers_url":"https://api.github.com/users/sbruno/followers","following_url":"https://api.github.com/users/sbruno/following{/other_user}","gists_url":"https://api.github.com/users/sbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/sbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbruno/subscriptions","organizations_url":"https://api.github.com/users/sbruno/orgs","repos_url":"https://api.github.com/users/sbruno/repos","events_url":"https://api.github.com/users/sbruno/events{/privacy}","received_events_url":"https://api.github.com/users/sbruno/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DiUS/pact-jvm/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-30T20:59:28Z","updated_at":"2015-09-02T02:52:14Z","closed_at":"2015-08-22T04:04:59Z","body":"I have a unit test that interacts with two different providers.\r\nI would like to know if it is possible to generate two different pact files, one for each provider in the same test.\r\nI tried defining two Pact functions, one for each provider, annotated with @ Pact and with the same state as the @ PactVerification test function but it didn't work.\r\n\r\nI'm using the PactRule junit rule\r\n\r\nBy inspecting its code it looks as it scans for all the Pact functions and stores them in a Map with the state as a key, so different pact fragments will be overwritten if they have the same state.\r\n\r\nIs there any way of acheiving what I need? Maybe without the Rule approach?\r\n"},"comment":{"url":"https://api.github.com/repos/DiUS/pact-jvm/issues/comments/136918710","html_url":"https://github.com/DiUS/pact-jvm/issues/117#issuecomment-136918710","issue_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/117","id":136918710,"user":{"login":"uglyog","id":863666,"avatar_url":"https://avatars.githubusercontent.com/u/863666?v=3","gravatar_id":"","url":"https://api.github.com/users/uglyog","html_url":"https://github.com/uglyog","followers_url":"https://api.github.com/users/uglyog/followers","following_url":"https://api.github.com/users/uglyog/following{/other_user}","gists_url":"https://api.github.com/users/uglyog/gists{/gist_id}","starred_url":"https://api.github.com/users/uglyog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uglyog/subscriptions","organizations_url":"https://api.github.com/users/uglyog/orgs","repos_url":"https://api.github.com/users/uglyog/repos","events_url":"https://api.github.com/users/uglyog/events{/privacy}","received_events_url":"https://api.github.com/users/uglyog/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T02:52:13Z","updated_at":"2015-09-02T02:52:13Z","body":"Are you saying you resolved the issue by using localhost? Or is this still a problem?"}}