{"action":"created","comment":{"url":"https://api.github.com/repos/kaazing/gateway/pulls/comments/38613266","id":38613266,"diff_hunk":"@@ -0,0 +1,300 @@\n+/*\n+ * Copyright 2014, Kaazing Corporation. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.kaazing.gateway.transport.wsn.specification.ws.connector;\n+\n+import static org.junit.Assert.assertTrue;\n+import static org.kaazing.test.util.ITUtil.createRuleChain;\n+\n+import java.nio.ByteBuffer;\n+import java.util.Random;\n+\n+import org.apache.mina.core.filterchain.IoFilterChain;\n+import org.apache.mina.core.future.ConnectFuture;\n+import org.apache.mina.core.service.IoHandler;\n+import org.junit.Ignore;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.rules.TestRule;\n+import org.kaazing.gateway.transport.IoHandlerAdapter;\n+import org.kaazing.gateway.transport.ws.bridge.filter.WsBuffer;\n+import org.kaazing.gateway.transport.wsn.WsnProtocol;\n+import org.kaazing.gateway.transport.wsn.WsnSession;\n+import org.kaazing.k3po.junit.annotation.Specification;\n+import org.kaazing.k3po.junit.rules.K3poRule;\n+import org.kaazing.mina.core.buffer.IoBufferAllocatorEx;\n+import org.kaazing.mina.core.buffer.IoBufferEx;\n+import org.kaazing.mina.core.session.IoSessionEx;\n+\n+public class BaseFramingIT {\n+    private final K3poRule k3po = new K3poRule().setScriptRoot(\"org/kaazing/specification/ws/framing\");\n+\n+    private final WsnConnectorRule connectorRule = new WsnConnectorRule();\n+\n+    @Rule\n+    public TestRule chain = createRuleChain(connectorRule, k3po);\n+\n+    @Test\n+    @Ignore(\"Exception: message is empty. Forgot to call flip()?\")\n+    @Specification({\n+        \"echo.binary.payload.length.0/handshake.response.and.frame\"\n+        })\n+    public void shouldEchoBinaryFrameWithPayloadLength0() throws Exception {\n+        IoHandler handler = newIoHandlerForBaseFraming(WsBuffer.Kind.BINARY, 0);","path":"transport/wsn/src/test/java/org/kaazing/gateway/transport/wsn/specification/ws/connector/BaseFramingIT.java","position":55,"original_position":55,"commit_id":"c4496af679681af6d32072ab81d6465bace4bb59","original_commit_id":"c4496af679681af6d32072ab81d6465bace4bb59","user":{"login":"jfallows","id":2099911,"avatar_url":"https://avatars.githubusercontent.com/u/2099911?v=3","gravatar_id":"","url":"https://api.github.com/users/jfallows","html_url":"https://github.com/jfallows","followers_url":"https://api.github.com/users/jfallows/followers","following_url":"https://api.github.com/users/jfallows/following{/other_user}","gists_url":"https://api.github.com/users/jfallows/gists{/gist_id}","starred_url":"https://api.github.com/users/jfallows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfallows/subscriptions","organizations_url":"https://api.github.com/users/jfallows/orgs","repos_url":"https://api.github.com/users/jfallows/repos","events_url":"https://api.github.com/users/jfallows/events{/privacy}","received_events_url":"https://api.github.com/users/jfallows/received_events","type":"User","site_admin":false},"body":"Recommend using jmock instead of an `IoHandler` implementation?\r\nRecommend inlining the mocked behavior to make each test readable and independent, otherwise deciphering each test requires reverse engineering the multi-purpose handler implementation.","created_at":"2015-09-03T05:00:21Z","updated_at":"2015-09-03T05:00:21Z","html_url":"https://github.com/kaazing/gateway/pull/301#discussion_r38613266","pull_request_url":"https://api.github.com/repos/kaazing/gateway/pulls/301","_links":{"self":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/comments/38613266"},"html":{"href":"https://github.com/kaazing/gateway/pull/301#discussion_r38613266"},"pull_request":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/301"}}},"pull_request":{"url":"https://api.github.com/repos/kaazing/gateway/pulls/301","id":44057619,"html_url":"https://github.com/kaazing/gateway/pull/301","diff_url":"https://github.com/kaazing/gateway/pull/301.diff","patch_url":"https://github.com/kaazing/gateway/pull/301.patch","issue_url":"https://api.github.com/repos/kaazing/gateway/issues/301","number":301,"state":"open","locked":false,"title":"Issue# 472: Added specification tests for WSN Connector.","user":{"login":"sanjay-saxena","id":7605221,"avatar_url":"https://avatars.githubusercontent.com/u/7605221?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjay-saxena","html_url":"https://github.com/sanjay-saxena","followers_url":"https://api.github.com/users/sanjay-saxena/followers","following_url":"https://api.github.com/users/sanjay-saxena/following{/other_user}","gists_url":"https://api.github.com/users/sanjay-saxena/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay-saxena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay-saxena/subscriptions","organizations_url":"https://api.github.com/users/sanjay-saxena/orgs","repos_url":"https://api.github.com/users/sanjay-saxena/repos","events_url":"https://api.github.com/users/sanjay-saxena/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay-saxena/received_events","type":"User","site_admin":false},"body":"Added testcases for BaseFramingIT, ClosingHandshakeIT, ControlIT, DataFramingIT, ExtensibilityIT, FragmentationIT, MaskingIT, and OpeningHandshakeIT test-suites. Refactored the existing WSN Acceptor tests into it's own package.\r\n","created_at":"2015-09-03T00:14:47Z","updated_at":"2015-09-03T05:00:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"719d7db1d5d259b0de597fd9c58d2d8748d14706","assignee":{"login":"jitsni","id":5131125,"avatar_url":"https://avatars.githubusercontent.com/u/5131125?v=3","gravatar_id":"","url":"https://api.github.com/users/jitsni","html_url":"https://github.com/jitsni","followers_url":"https://api.github.com/users/jitsni/followers","following_url":"https://api.github.com/users/jitsni/following{/other_user}","gists_url":"https://api.github.com/users/jitsni/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsni/subscriptions","organizations_url":"https://api.github.com/users/jitsni/orgs","repos_url":"https://api.github.com/users/jitsni/repos","events_url":"https://api.github.com/users/jitsni/events{/privacy}","received_events_url":"https://api.github.com/users/jitsni/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kaazing/gateway/pulls/301/commits","review_comments_url":"https://api.github.com/repos/kaazing/gateway/pulls/301/comments","review_comment_url":"https://api.github.com/repos/kaazing/gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaazing/gateway/issues/301/comments","statuses_url":"https://api.github.com/repos/kaazing/gateway/statuses/c4496af679681af6d32072ab81d6465bace4bb59","head":{"label":"sanjay-saxena:develop","ref":"develop","sha":"c4496af679681af6d32072ab81d6465bace4bb59","user":{"login":"sanjay-saxena","id":7605221,"avatar_url":"https://avatars.githubusercontent.com/u/7605221?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjay-saxena","html_url":"https://github.com/sanjay-saxena","followers_url":"https://api.github.com/users/sanjay-saxena/followers","following_url":"https://api.github.com/users/sanjay-saxena/following{/other_user}","gists_url":"https://api.github.com/users/sanjay-saxena/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay-saxena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay-saxena/subscriptions","organizations_url":"https://api.github.com/users/sanjay-saxena/orgs","repos_url":"https://api.github.com/users/sanjay-saxena/repos","events_url":"https://api.github.com/users/sanjay-saxena/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay-saxena/received_events","type":"User","site_admin":false},"repo":{"id":41704941,"name":"gateway","full_name":"sanjay-saxena/gateway","owner":{"login":"sanjay-saxena","id":7605221,"avatar_url":"https://avatars.githubusercontent.com/u/7605221?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjay-saxena","html_url":"https://github.com/sanjay-saxena","followers_url":"https://api.github.com/users/sanjay-saxena/followers","following_url":"https://api.github.com/users/sanjay-saxena/following{/other_user}","gists_url":"https://api.github.com/users/sanjay-saxena/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay-saxena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay-saxena/subscriptions","organizations_url":"https://api.github.com/users/sanjay-saxena/orgs","repos_url":"https://api.github.com/users/sanjay-saxena/repos","events_url":"https://api.github.com/users/sanjay-saxena/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay-saxena/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanjay-saxena/gateway","description":"Kaazing Gateway","fork":true,"url":"https://api.github.com/repos/sanjay-saxena/gateway","forks_url":"https://api.github.com/repos/sanjay-saxena/gateway/forks","keys_url":"https://api.github.com/repos/sanjay-saxena/gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjay-saxena/gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjay-saxena/gateway/teams","hooks_url":"https://api.github.com/repos/sanjay-saxena/gateway/hooks","issue_events_url":"https://api.github.com/repos/sanjay-saxena/gateway/issues/events{/number}","events_url":"https://api.github.com/repos/sanjay-saxena/gateway/events","assignees_url":"https://api.github.com/repos/sanjay-saxena/gateway/assignees{/user}","branches_url":"https://api.github.com/repos/sanjay-saxena/gateway/branches{/branch}","tags_url":"https://api.github.com/repos/sanjay-saxena/gateway/tags","blobs_url":"https://api.github.com/repos/sanjay-saxena/gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjay-saxena/gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjay-saxena/gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjay-saxena/gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjay-saxena/gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjay-saxena/gateway/languages","stargazers_url":"https://api.github.com/repos/sanjay-saxena/gateway/stargazers","contributors_url":"https://api.github.com/repos/sanjay-saxena/gateway/contributors","subscribers_url":"https://api.github.com/repos/sanjay-saxena/gateway/subscribers","subscription_url":"https://api.github.com/repos/sanjay-saxena/gateway/subscription","commits_url":"https://api.github.com/repos/sanjay-saxena/gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjay-saxena/gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjay-saxena/gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjay-saxena/gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjay-saxena/gateway/contents/{+path}","compare_url":"https://api.github.com/repos/sanjay-saxena/gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjay-saxena/gateway/merges","archive_url":"https://api.github.com/repos/sanjay-saxena/gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjay-saxena/gateway/downloads","issues_url":"https://api.github.com/repos/sanjay-saxena/gateway/issues{/number}","pulls_url":"https://api.github.com/repos/sanjay-saxena/gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjay-saxena/gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjay-saxena/gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjay-saxena/gateway/labels{/name}","releases_url":"https://api.github.com/repos/sanjay-saxena/gateway/releases{/id}","created_at":"2015-08-31T23:03:27Z","updated_at":"2015-08-31T23:03:34Z","pushed_at":"2015-09-03T00:10:54Z","git_url":"git://github.com/sanjay-saxena/gateway.git","ssh_url":"git@github.com:sanjay-saxena/gateway.git","clone_url":"https://github.com/sanjay-saxena/gateway.git","svn_url":"https://github.com/sanjay-saxena/gateway","homepage":"","size":10282,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"kaazing:develop","ref":"develop","sha":"ff45ee682ac88172582b20568f6e5410a2f6a29a","user":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"repo":{"id":26745548,"name":"gateway","full_name":"kaazing/gateway","owner":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaazing/gateway","description":"Kaazing Gateway","fork":false,"url":"https://api.github.com/repos/kaazing/gateway","forks_url":"https://api.github.com/repos/kaazing/gateway/forks","keys_url":"https://api.github.com/repos/kaazing/gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaazing/gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaazing/gateway/teams","hooks_url":"https://api.github.com/repos/kaazing/gateway/hooks","issue_events_url":"https://api.github.com/repos/kaazing/gateway/issues/events{/number}","events_url":"https://api.github.com/repos/kaazing/gateway/events","assignees_url":"https://api.github.com/repos/kaazing/gateway/assignees{/user}","branches_url":"https://api.github.com/repos/kaazing/gateway/branches{/branch}","tags_url":"https://api.github.com/repos/kaazing/gateway/tags","blobs_url":"https://api.github.com/repos/kaazing/gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaazing/gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaazing/gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaazing/gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaazing/gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/kaazing/gateway/languages","stargazers_url":"https://api.github.com/repos/kaazing/gateway/stargazers","contributors_url":"https://api.github.com/repos/kaazing/gateway/contributors","subscribers_url":"https://api.github.com/repos/kaazing/gateway/subscribers","subscription_url":"https://api.github.com/repos/kaazing/gateway/subscription","commits_url":"https://api.github.com/repos/kaazing/gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaazing/gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaazing/gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaazing/gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaazing/gateway/contents/{+path}","compare_url":"https://api.github.com/repos/kaazing/gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaazing/gateway/merges","archive_url":"https://api.github.com/repos/kaazing/gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaazing/gateway/downloads","issues_url":"https://api.github.com/repos/kaazing/gateway/issues{/number}","pulls_url":"https://api.github.com/repos/kaazing/gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/kaazing/gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/kaazing/gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaazing/gateway/labels{/name}","releases_url":"https://api.github.com/repos/kaazing/gateway/releases{/id}","created_at":"2014-11-17T07:40:57Z","updated_at":"2015-08-26T20:59:56Z","pushed_at":"2015-09-03T04:37:38Z","git_url":"git://github.com/kaazing/gateway.git","ssh_url":"git@github.com:kaazing/gateway.git","clone_url":"https://github.com/kaazing/gateway.git","svn_url":"https://github.com/kaazing/gateway","homepage":"","size":15941,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":52,"forks":33,"open_issues":52,"watchers":33,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/301"},"html":{"href":"https://github.com/kaazing/gateway/pull/301"},"issue":{"href":"https://api.github.com/repos/kaazing/gateway/issues/301"},"comments":{"href":"https://api.github.com/repos/kaazing/gateway/issues/301/comments"},"review_comments":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/301/comments"},"review_comment":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/301/commits"},"statuses":{"href":"https://api.github.com/repos/kaazing/gateway/statuses/c4496af679681af6d32072ab81d6465bace4bb59"}}}}