{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/28159389","id":28159389,"diff_hunk":"@@ -135,69 +131,46 @@ public void describeTo( Description description )\n         };\n     }\n \n-    public static Matcher<Message> msgItem( final Matcher<Record> matcher )\n+    public static Matcher<Message> msgFailure( final Neo4jError error )\n     {\n         return new TypeSafeMatcher<Message>()\n         {\n             @Override\n             protected boolean matchesSafely( Message t )\n             {\n-                assertThat( t, instanceOf( RecordMessage.class ) );\n-\n-                RecordMessage msg = (RecordMessage) t;\n-                assertThat( msg.record(), matcher );\n+                assertThat( t, instanceOf( FailureMessage.class ) );\n+                FailureMessage msg = (FailureMessage)t;\n+                assertThat( msg.cause(), equalTo( error ));\n                 return true;\n             }\n \n             @Override\n             public void describeTo( Description description )\n             {\n-                description.appendText( \"ITEM \" );\n-                description.appendDescriptionOf( matcher );\n+                description.appendText( \"SUCCESS\" );\n             }\n         };\n     }\n \n-    public static Matcher<Object> mapMatcher( final Object... alternatingKeyValue )\n+    public static Matcher<Message> msgItem( final Matcher<Record> matcher )\n     {\n-        final Map<String, Object> expected = MapUtil.map( alternatingKeyValue );\n-        return new TypeSafeMatcher<Object>()\n+        return new TypeSafeMatcher<Message>()\n         {\n             @Override\n-            protected boolean matchesSafely( Object t )\n+            protected boolean matchesSafely( Message t )\n             {\n-                assertThat( t, instanceOf( Map.class ) );\n-                assertThat(((Map<String, Object>)t).entrySet(), equalTo( expected.entrySet() ));\n+                assertThat( t, instanceOf( RecordMessage.class ) );\n+\n+                RecordMessage msg = (RecordMessage) t;\n+                assertThat( msg.record(), matcher );\n                 return true;\n             }\n \n             @Override\n             public void describeTo( Description description )\n             {\n-                description.appendText( expected.toString() );\n-            }\n-        };\n-    }\n-\n-    public static HTTP.Payload messages( Message... messages ) throws IOException\n-    {\n-        return createHttpPayload( serialize( messages ) );\n-    }\n-\n-    public static HTTP.Payload createHttpPayload( final byte[] payload )\n-    {\n-        return new HTTP.Payload()\n-        {\n-            @Override\n-            public Object content()\n-            {\n-                return payload;\n-            }\n-\n-            @Override\n-            public MediaType contentType()\n-            {\n-                return MediaType.valueOf( PackStreamMessageFormatV1.CONTENT_TYPE );\n+                description.appendText( \"ITEM \" );","path":"community/ndp/messaging-v1/src/test/java/org/neo4j/ndp/messaging/v1/util/MessageMatchers.java","position":161,"original_position":161,"commit_id":"c7f768c515af7cd1b534058f0d70438fd39f9198","original_commit_id":"c7f768c515af7cd1b534058f0d70438fd39f9198","user":{"login":"nigelsmall","id":275311,"avatar_url":"https://avatars.githubusercontent.com/u/275311?v=3","gravatar_id":"","url":"https://api.github.com/users/nigelsmall","html_url":"https://github.com/nigelsmall","followers_url":"https://api.github.com/users/nigelsmall/followers","following_url":"https://api.github.com/users/nigelsmall/following{/other_user}","gists_url":"https://api.github.com/users/nigelsmall/gists{/gist_id}","starred_url":"https://api.github.com/users/nigelsmall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigelsmall/subscriptions","organizations_url":"https://api.github.com/users/nigelsmall/orgs","repos_url":"https://api.github.com/users/nigelsmall/repos","events_url":"https://api.github.com/users/nigelsmall/events{/privacy}","received_events_url":"https://api.github.com/users/nigelsmall/received_events","type":"User","site_admin":false},"body":"Should this be `RECORD`?","created_at":"2015-04-10T16:31:11Z","updated_at":"2015-04-10T16:31:11Z","html_url":"https://github.com/neo4j/neo4j/pull/4376#discussion_r28159389","pull_request_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4376","_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/28159389"},"html":{"href":"https://github.com/neo4j/neo4j/pull/4376#discussion_r28159389"},"pull_request":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4376"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/4376","id":32731126,"html_url":"https://github.com/neo4j/neo4j/pull/4376","diff_url":"https://github.com/neo4j/neo4j/pull/4376.diff","patch_url":"https://github.com/neo4j/neo4j/pull/4376.patch","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/4376","number":4376,"state":"open","locked":false,"title":"Skeletal socket transport","user":{"login":"jakewins","id":182752,"avatar_url":"https://avatars.githubusercontent.com/u/182752?v=3","gravatar_id":"","url":"https://api.github.com/users/jakewins","html_url":"https://github.com/jakewins","followers_url":"https://api.github.com/users/jakewins/followers","following_url":"https://api.github.com/users/jakewins/following{/other_user}","gists_url":"https://api.github.com/users/jakewins/gists{/gist_id}","starred_url":"https://api.github.com/users/jakewins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakewins/subscriptions","organizations_url":"https://api.github.com/users/jakewins/orgs","repos_url":"https://api.github.com/users/jakewins/repos","events_url":"https://api.github.com/users/jakewins/events{/privacy}","received_events_url":"https://api.github.com/users/jakewins/received_events","type":"User","site_admin":false},"body":"Does not yet support the actual message protocol, this is the module skeleton\r\nand a proposal for version negotiation. \r\n\r\nChoosing a version needs to be highly\r\nflexible for future protocol changes. This PR lets the client propose up to four\r\nsupported protocol versions, in order of preference, and the server then chooses\r\nthe first one it supports (or tells the client none will work):\r\n\r\n    Client: <connect>\r\n    Client: 0 0 0 2  0 0 0 1  0 0 0 0  0 0 0 0  // I support version '2' and '1', and prefer '2'\r\n    Server: 0 0 0 1 // Version '1' will have to do\r\n    <begin versioned messaging>\r\n\r\nThis is done outside the scope of PackStream (allowing it to change cross\r\nversions), the messaging protocol and the (yet-to-be-created) framing protocol.\r\n\r\nThe number of proposed versions is bounded to 4 (if the client wants to try\r\nmore it can simply send a new version proposal, having it be fixed-width lowers\r\ncomplexity), each version is a 4-byte unsigned integer, bounding the number of\r\nprotocol versions we can have to 4 294 967 295, which is a very large number and\r\nshould be ample time for Elon Musk to sort all this 'computer' stuff out for us.\r\n\r\nSee SocketSessionIT for examples of negotiating protocol version.","created_at":"2015-04-07T03:39:06Z","updated_at":"2015-04-10T16:31:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"848d170621f03469b881e9e88bfaac0d999f55b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4376/commits","review_comments_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4376/comments","review_comment_url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/4376/comments","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/c7f768c515af7cd1b534058f0d70438fd39f9198","head":{"label":"jakewins:2.3-socket-transport","ref":"2.3-socket-transport","sha":"c7f768c515af7cd1b534058f0d70438fd39f9198","user":{"login":"jakewins","id":182752,"avatar_url":"https://avatars.githubusercontent.com/u/182752?v=3","gravatar_id":"","url":"https://api.github.com/users/jakewins","html_url":"https://github.com/jakewins","followers_url":"https://api.github.com/users/jakewins/followers","following_url":"https://api.github.com/users/jakewins/following{/other_user}","gists_url":"https://api.github.com/users/jakewins/gists{/gist_id}","starred_url":"https://api.github.com/users/jakewins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakewins/subscriptions","organizations_url":"https://api.github.com/users/jakewins/orgs","repos_url":"https://api.github.com/users/jakewins/repos","events_url":"https://api.github.com/users/jakewins/events{/privacy}","received_events_url":"https://api.github.com/users/jakewins/received_events","type":"User","site_admin":false},"repo":{"id":6761171,"name":"neo4j","full_name":"jakewins/neo4j","owner":{"login":"jakewins","id":182752,"avatar_url":"https://avatars.githubusercontent.com/u/182752?v=3","gravatar_id":"","url":"https://api.github.com/users/jakewins","html_url":"https://github.com/jakewins","followers_url":"https://api.github.com/users/jakewins/followers","following_url":"https://api.github.com/users/jakewins/following{/other_user}","gists_url":"https://api.github.com/users/jakewins/gists{/gist_id}","starred_url":"https://api.github.com/users/jakewins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakewins/subscriptions","organizations_url":"https://api.github.com/users/jakewins/orgs","repos_url":"https://api.github.com/users/jakewins/repos","events_url":"https://api.github.com/users/jakewins/events{/privacy}","received_events_url":"https://api.github.com/users/jakewins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakewins/neo4j","description":"","fork":true,"url":"https://api.github.com/repos/jakewins/neo4j","forks_url":"https://api.github.com/repos/jakewins/neo4j/forks","keys_url":"https://api.github.com/repos/jakewins/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakewins/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakewins/neo4j/teams","hooks_url":"https://api.github.com/repos/jakewins/neo4j/hooks","issue_events_url":"https://api.github.com/repos/jakewins/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/jakewins/neo4j/events","assignees_url":"https://api.github.com/repos/jakewins/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/jakewins/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/jakewins/neo4j/tags","blobs_url":"https://api.github.com/repos/jakewins/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakewins/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakewins/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakewins/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakewins/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/jakewins/neo4j/languages","stargazers_url":"https://api.github.com/repos/jakewins/neo4j/stargazers","contributors_url":"https://api.github.com/repos/jakewins/neo4j/contributors","subscribers_url":"https://api.github.com/repos/jakewins/neo4j/subscribers","subscription_url":"https://api.github.com/repos/jakewins/neo4j/subscription","commits_url":"https://api.github.com/repos/jakewins/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakewins/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakewins/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakewins/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakewins/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/jakewins/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakewins/neo4j/merges","archive_url":"https://api.github.com/repos/jakewins/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakewins/neo4j/downloads","issues_url":"https://api.github.com/repos/jakewins/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/jakewins/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/jakewins/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/jakewins/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakewins/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/jakewins/neo4j/releases{/id}","created_at":"2012-11-19T13:59:44Z","updated_at":"2014-06-17T11:02:23Z","pushed_at":"2015-04-10T13:23:47Z","git_url":"git://github.com/jakewins/neo4j.git","ssh_url":"git@github.com:jakewins/neo4j.git","clone_url":"https://github.com/jakewins/neo4j.git","svn_url":"https://github.com/jakewins/neo4j","homepage":null,"size":190616,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neo4j:2.3","ref":"2.3","sha":"5fdbd35ce42a9cb0ae95ddaa7497828897892d67","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":6650539,"name":"neo4j","full_name":"neo4j/neo4j","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/neo4j","description":"Graphs for Everyone","fork":false,"url":"https://api.github.com/repos/neo4j/neo4j","forks_url":"https://api.github.com/repos/neo4j/neo4j/forks","keys_url":"https://api.github.com/repos/neo4j/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/neo4j/teams","hooks_url":"https://api.github.com/repos/neo4j/neo4j/hooks","issue_events_url":"https://api.github.com/repos/neo4j/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/neo4j/events","assignees_url":"https://api.github.com/repos/neo4j/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/neo4j/tags","blobs_url":"https://api.github.com/repos/neo4j/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/neo4j/languages","stargazers_url":"https://api.github.com/repos/neo4j/neo4j/stargazers","contributors_url":"https://api.github.com/repos/neo4j/neo4j/contributors","subscribers_url":"https://api.github.com/repos/neo4j/neo4j/subscribers","subscription_url":"https://api.github.com/repos/neo4j/neo4j/subscription","commits_url":"https://api.github.com/repos/neo4j/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/neo4j/merges","archive_url":"https://api.github.com/repos/neo4j/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/neo4j/downloads","issues_url":"https://api.github.com/repos/neo4j/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/neo4j/releases{/id}","created_at":"2012-11-12T08:46:15Z","updated_at":"2015-04-10T15:32:59Z","pushed_at":"2015-04-10T16:09:21Z","git_url":"git://github.com/neo4j/neo4j.git","ssh_url":"git@github.com:neo4j/neo4j.git","clone_url":"https://github.com/neo4j/neo4j.git","svn_url":"https://github.com/neo4j/neo4j","homepage":"http://neo4j.com","size":444859,"stargazers_count":1583,"watchers_count":1583,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":650,"mirror_url":null,"open_issues_count":414,"forks":650,"open_issues":414,"watchers":1583,"default_branch":"2.3"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4376"},"html":{"href":"https://github.com/neo4j/neo4j/pull/4376"},"issue":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/4376"},"comments":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/4376/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4376/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4376/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/neo4j/statuses/c7f768c515af7cd1b534058f0d70438fd39f9198"}}}}