{"action":"created","comment":{"url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments/65182886","id":65182886,"diff_hunk":"@@ -0,0 +1,40 @@\n+package com.clouway;\n+\n+import org.jmock.Expectations;\n+import org.jmock.auto.Mock;\n+import org.jmock.integration.junit4.JUnitRuleMockery;\n+import org.junit.Rule;\n+import org.junit.Test;\n+\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+\n+/**\n+ * Created by clouway on 17.05.16.\n+ */\n+public class DispatcherTest {\n+  @Rule\n+  public JUnitRuleMockery context = new JUnitRuleMockery();\n+\n+  @Mock\n+  HttpServletRequest request;\n+\n+  @Mock\n+  HttpServletResponse response;\n+\n+  @Test\n+  public void happyPath() throws Exception {\n+    final String page = \"abv\";\n+    final int port = request.getServerPort();\n+    Dispatcher dispatecher = new Dispatcher();\n+    context.checking(new Expectations() {{\n+      oneOf(request).getParameter(\"page\");\n+      will(returnValue(page));\n+      oneOf(response).setContentType(\"text/html;charset=UTF-8\");\n+      oneOf(response).sendRedirect(\"http://localhost:\" + port + \"/\" + page);","path":"task3/src/main/test/com.clouway/DispatcherTest.java","position":34,"original_position":34,"commit_id":"cbd7175695a827b2820a4048046157172c8a3996","original_commit_id":"cbd7175695a827b2820a4048046157172c8a3996","user":{"login":"panayotkulchev","id":8696264,"avatar_url":"https://avatars.githubusercontent.com/u/8696264?v=3","gravatar_id":"","url":"https://api.github.com/users/panayotkulchev","html_url":"https://github.com/panayotkulchev","followers_url":"https://api.github.com/users/panayotkulchev/followers","following_url":"https://api.github.com/users/panayotkulchev/following{/other_user}","gists_url":"https://api.github.com/users/panayotkulchev/gists{/gist_id}","starred_url":"https://api.github.com/users/panayotkulchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panayotkulchev/subscriptions","organizations_url":"https://api.github.com/users/panayotkulchev/orgs","repos_url":"https://api.github.com/users/panayotkulchev/repos","events_url":"https://api.github.com/users/panayotkulchev/events{/privacy}","received_events_url":"https://api.github.com/users/panayotkulchev/received_events","type":"User","site_admin":false},"body":"do not think this test will pass or I am wrong? Allays run tests before push the commits and put the label for review!","created_at":"2016-05-31T13:42:14Z","updated_at":"2016-05-31T13:42:14Z","html_url":"https://github.com/clouway-incubator/servlets/pull/18#discussion_r65182886","pull_request_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments/65182886"},"html":{"href":"https://github.com/clouway-incubator/servlets/pull/18#discussion_r65182886"},"pull_request":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18","id":70321048,"html_url":"https://github.com/clouway-incubator/servlets/pull/18","diff_url":"https://github.com/clouway-incubator/servlets/pull/18.diff","patch_url":"https://github.com/clouway-incubator/servlets/pull/18.patch","issue_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/18","number":18,"state":"open","locked":false,"title":"Servlets: Redirect task","user":{"login":"kristiyanpetkov","id":12229738,"avatar_url":"https://avatars.githubusercontent.com/u/12229738?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiyanpetkov","html_url":"https://github.com/kristiyanpetkov","followers_url":"https://api.github.com/users/kristiyanpetkov/followers","following_url":"https://api.github.com/users/kristiyanpetkov/following{/other_user}","gists_url":"https://api.github.com/users/kristiyanpetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiyanpetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiyanpetkov/subscriptions","organizations_url":"https://api.github.com/users/kristiyanpetkov/orgs","repos_url":"https://api.github.com/users/kristiyanpetkov/repos","events_url":"https://api.github.com/users/kristiyanpetkov/events{/privacy}","received_events_url":"https://api.github.com/users/kristiyanpetkov/received_events","type":"User","site_admin":false},"body":"In my PR i have main html page named \"menu\" with three radio buttons. Depending on our choice, each of them redirect us to a different page, using dispatcher servlet. If the choosen page is loaded for the first time, a welcome message appears.\r\nHomepage:\r\n![screenshot from 2016-05-17 11-56-11](https://cloud.githubusercontent.com/assets/12229738/15316594/6557df2a-1c26-11e6-9082-3cbdd5c0ded0.png)\r\n\r\nLoading yahoo page for the first time:\r\n![screenshot from 2016-05-17 11-56-19](https://cloud.githubusercontent.com/assets/12229738/15316615/7750be9a-1c26-11e6-8be1-540b08b7f588.png)\r\n\r\n","created_at":"2016-05-17T08:57:52Z","updated_at":"2016-05-31T13:42:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b26e7b6fb9b24f218cf76021fc207a06d2ffdb0","assignee":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=3","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18/commits","review_comments_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18/comments","review_comment_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/18/comments","statuses_url":"https://api.github.com/repos/clouway-incubator/servlets/statuses/cbd7175695a827b2820a4048046157172c8a3996","head":{"label":"kristiyanpetkov:task3","ref":"task3","sha":"cbd7175695a827b2820a4048046157172c8a3996","user":{"login":"kristiyanpetkov","id":12229738,"avatar_url":"https://avatars.githubusercontent.com/u/12229738?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiyanpetkov","html_url":"https://github.com/kristiyanpetkov","followers_url":"https://api.github.com/users/kristiyanpetkov/followers","following_url":"https://api.github.com/users/kristiyanpetkov/following{/other_user}","gists_url":"https://api.github.com/users/kristiyanpetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiyanpetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiyanpetkov/subscriptions","organizations_url":"https://api.github.com/users/kristiyanpetkov/orgs","repos_url":"https://api.github.com/users/kristiyanpetkov/repos","events_url":"https://api.github.com/users/kristiyanpetkov/events{/privacy}","received_events_url":"https://api.github.com/users/kristiyanpetkov/received_events","type":"User","site_admin":false},"repo":{"id":58708462,"name":"servlets","full_name":"kristiyanpetkov/servlets","owner":{"login":"kristiyanpetkov","id":12229738,"avatar_url":"https://avatars.githubusercontent.com/u/12229738?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiyanpetkov","html_url":"https://github.com/kristiyanpetkov","followers_url":"https://api.github.com/users/kristiyanpetkov/followers","following_url":"https://api.github.com/users/kristiyanpetkov/following{/other_user}","gists_url":"https://api.github.com/users/kristiyanpetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiyanpetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiyanpetkov/subscriptions","organizations_url":"https://api.github.com/users/kristiyanpetkov/orgs","repos_url":"https://api.github.com/users/kristiyanpetkov/repos","events_url":"https://api.github.com/users/kristiyanpetkov/events{/privacy}","received_events_url":"https://api.github.com/users/kristiyanpetkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kristiyanpetkov/servlets","description":"Servlets ","fork":true,"url":"https://api.github.com/repos/kristiyanpetkov/servlets","forks_url":"https://api.github.com/repos/kristiyanpetkov/servlets/forks","keys_url":"https://api.github.com/repos/kristiyanpetkov/servlets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kristiyanpetkov/servlets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kristiyanpetkov/servlets/teams","hooks_url":"https://api.github.com/repos/kristiyanpetkov/servlets/hooks","issue_events_url":"https://api.github.com/repos/kristiyanpetkov/servlets/issues/events{/number}","events_url":"https://api.github.com/repos/kristiyanpetkov/servlets/events","assignees_url":"https://api.github.com/repos/kristiyanpetkov/servlets/assignees{/user}","branches_url":"https://api.github.com/repos/kristiyanpetkov/servlets/branches{/branch}","tags_url":"https://api.github.com/repos/kristiyanpetkov/servlets/tags","blobs_url":"https://api.github.com/repos/kristiyanpetkov/servlets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kristiyanpetkov/servlets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kristiyanpetkov/servlets/git/refs{/sha}","trees_url":"https://api.github.com/repos/kristiyanpetkov/servlets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kristiyanpetkov/servlets/statuses/{sha}","languages_url":"https://api.github.com/repos/kristiyanpetkov/servlets/languages","stargazers_url":"https://api.github.com/repos/kristiyanpetkov/servlets/stargazers","contributors_url":"https://api.github.com/repos/kristiyanpetkov/servlets/contributors","subscribers_url":"https://api.github.com/repos/kristiyanpetkov/servlets/subscribers","subscription_url":"https://api.github.com/repos/kristiyanpetkov/servlets/subscription","commits_url":"https://api.github.com/repos/kristiyanpetkov/servlets/commits{/sha}","git_commits_url":"https://api.github.com/repos/kristiyanpetkov/servlets/git/commits{/sha}","comments_url":"https://api.github.com/repos/kristiyanpetkov/servlets/comments{/number}","issue_comment_url":"https://api.github.com/repos/kristiyanpetkov/servlets/issues/comments{/number}","contents_url":"https://api.github.com/repos/kristiyanpetkov/servlets/contents/{+path}","compare_url":"https://api.github.com/repos/kristiyanpetkov/servlets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kristiyanpetkov/servlets/merges","archive_url":"https://api.github.com/repos/kristiyanpetkov/servlets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kristiyanpetkov/servlets/downloads","issues_url":"https://api.github.com/repos/kristiyanpetkov/servlets/issues{/number}","pulls_url":"https://api.github.com/repos/kristiyanpetkov/servlets/pulls{/number}","milestones_url":"https://api.github.com/repos/kristiyanpetkov/servlets/milestones{/number}","notifications_url":"https://api.github.com/repos/kristiyanpetkov/servlets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kristiyanpetkov/servlets/labels{/name}","releases_url":"https://api.github.com/repos/kristiyanpetkov/servlets/releases{/id}","deployments_url":"https://api.github.com/repos/kristiyanpetkov/servlets/deployments","created_at":"2016-05-13T06:41:35Z","updated_at":"2015-10-15T06:53:35Z","pushed_at":"2016-05-31T12:05:19Z","git_url":"git://github.com/kristiyanpetkov/servlets.git","ssh_url":"git@github.com:kristiyanpetkov/servlets.git","clone_url":"https://github.com/kristiyanpetkov/servlets.git","svn_url":"https://github.com/kristiyanpetkov/servlets","homepage":null,"size":205,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"clouway-incubator:kristiyan","ref":"kristiyan","sha":"27ccbaa98007a4375c1e29a1fdd936baf68a059e","user":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":44299216,"name":"servlets","full_name":"clouway-incubator/servlets","owner":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clouway-incubator/servlets","description":"Servlets ","fork":false,"url":"https://api.github.com/repos/clouway-incubator/servlets","forks_url":"https://api.github.com/repos/clouway-incubator/servlets/forks","keys_url":"https://api.github.com/repos/clouway-incubator/servlets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clouway-incubator/servlets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clouway-incubator/servlets/teams","hooks_url":"https://api.github.com/repos/clouway-incubator/servlets/hooks","issue_events_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/events{/number}","events_url":"https://api.github.com/repos/clouway-incubator/servlets/events","assignees_url":"https://api.github.com/repos/clouway-incubator/servlets/assignees{/user}","branches_url":"https://api.github.com/repos/clouway-incubator/servlets/branches{/branch}","tags_url":"https://api.github.com/repos/clouway-incubator/servlets/tags","blobs_url":"https://api.github.com/repos/clouway-incubator/servlets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clouway-incubator/servlets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clouway-incubator/servlets/git/refs{/sha}","trees_url":"https://api.github.com/repos/clouway-incubator/servlets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clouway-incubator/servlets/statuses/{sha}","languages_url":"https://api.github.com/repos/clouway-incubator/servlets/languages","stargazers_url":"https://api.github.com/repos/clouway-incubator/servlets/stargazers","contributors_url":"https://api.github.com/repos/clouway-incubator/servlets/contributors","subscribers_url":"https://api.github.com/repos/clouway-incubator/servlets/subscribers","subscription_url":"https://api.github.com/repos/clouway-incubator/servlets/subscription","commits_url":"https://api.github.com/repos/clouway-incubator/servlets/commits{/sha}","git_commits_url":"https://api.github.com/repos/clouway-incubator/servlets/git/commits{/sha}","comments_url":"https://api.github.com/repos/clouway-incubator/servlets/comments{/number}","issue_comment_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/comments{/number}","contents_url":"https://api.github.com/repos/clouway-incubator/servlets/contents/{+path}","compare_url":"https://api.github.com/repos/clouway-incubator/servlets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clouway-incubator/servlets/merges","archive_url":"https://api.github.com/repos/clouway-incubator/servlets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clouway-incubator/servlets/downloads","issues_url":"https://api.github.com/repos/clouway-incubator/servlets/issues{/number}","pulls_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls{/number}","milestones_url":"https://api.github.com/repos/clouway-incubator/servlets/milestones{/number}","notifications_url":"https://api.github.com/repos/clouway-incubator/servlets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clouway-incubator/servlets/labels{/name}","releases_url":"https://api.github.com/repos/clouway-incubator/servlets/releases{/id}","deployments_url":"https://api.github.com/repos/clouway-incubator/servlets/deployments","created_at":"2015-10-15T06:53:35Z","updated_at":"2015-10-15T06:53:35Z","pushed_at":"2016-05-31T12:05:20Z","git_url":"git://github.com/clouway-incubator/servlets.git","ssh_url":"git@github.com:clouway-incubator/servlets.git","clone_url":"https://github.com/clouway-incubator/servlets.git","svn_url":"https://github.com/clouway-incubator/servlets","homepage":null,"size":953,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18"},"html":{"href":"https://github.com/clouway-incubator/servlets/pull/18"},"issue":{"href":"https://api.github.com/repos/clouway-incubator/servlets/issues/18"},"comments":{"href":"https://api.github.com/repos/clouway-incubator/servlets/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/clouway-incubator/servlets/statuses/cbd7175695a827b2820a4048046157172c8a3996"}}}}
{"actor":{"display_login":"panayotkulchev"}}