{"action":"opened","issue":{"url":"https://api.github.com/repos/gocardless/gocardless-pro-java/issues/2","labels_url":"https://api.github.com/repos/gocardless/gocardless-pro-java/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/gocardless/gocardless-pro-java/issues/2/comments","events_url":"https://api.github.com/repos/gocardless/gocardless-pro-java/issues/2/events","html_url":"https://github.com/gocardless/gocardless-pro-java/issues/2","id":73956080,"number":2,"title":"Interface abstractions","user":{"login":"craigjbass","id":1889973,"avatar_url":"https://avatars.githubusercontent.com/u/1889973?v=3","gravatar_id":"","url":"https://api.github.com/users/craigjbass","html_url":"https://github.com/craigjbass","followers_url":"https://api.github.com/users/craigjbass/followers","following_url":"https://api.github.com/users/craigjbass/following{/other_user}","gists_url":"https://api.github.com/users/craigjbass/gists{/gist_id}","starred_url":"https://api.github.com/users/craigjbass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigjbass/subscriptions","organizations_url":"https://api.github.com/users/craigjbass/orgs","repos_url":"https://api.github.com/users/craigjbass/repos","events_url":"https://api.github.com/users/craigjbass/events{/privacy}","received_events_url":"https://api.github.com/users/craigjbass/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-07T11:46:04Z","updated_at":"2015-05-07T11:46:04Z","closed_at":null,"body":"When I define my code, I want to depend on abstract boundary interfaces not concrete implementations.\r\n\r\ne.g.\r\n\r\n```scala\r\nclass SomeUseCase( gocardless:SomeGoCardlessUseCase ) {\r\n   def execute(): Unit = {\r\n       gocardless doSomething\r\n   }\r\n}\r\n```\r\n\r\n```java\r\npublic class SomeUseCaseTest {\r\n    @Test\r\n    public void testSomething() {\r\n        new SomeUseCase( new SomeGoCardlessUseCase() {\r\n          ... create a test double stub ...\r\n        } );\r\n    }\r\n\r\n}\r\n```\r\n\r\n"}}