{"action":"created","comment":{"url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/comments/55644372","id":55644372,"diff_hunk":"@@ -124,5 +125,112 @@ public void testGroupsAsTopologyChild() throws Exception {\n         assertTrue(topologyGroups.containsKey(\"sla_gen_info\"));\n     }\n \n+    @Test\n+    @SuppressWarnings(\"unchecked\")\n+    public void testNuroDAM() throws Exception {\n+        String adp = new Scanner(new File(Resources.getResource(\"nuro_adp.yml\").toURI())).useDelimiter(\"\\\\Z\").next();\n+\n+        when(fakeAgreementManager.generateAgreeemntId(((Map<String, Object>) anyObject())))\n+                .thenReturn(FAKE_AGREEMENT_ID);\n+\n+        DamGenerator damGenerator = new DamGenerator(MONITOR_URL, MONITOR_PORT, SLA_ENDPOINT, INFLUXDB_URL, INFLUXDB_PORT);\n+        damGenerator.setAgreementManager(fakeAgreementManager);\n+        dam = damGenerator.generateDam(adp);\n+        template = (Map<String, Object>) yamlParser.load(dam);\n+\n+        String expectedDAMString = new Scanner(new File(Resources.getResource(\"nuro_dam.yml\").toURI())).useDelimiter(\"\\\\Z\").next();\n+        Map<String, Object> expectedDAM = (Map<String, Object>) yamlParser.load(expectedDAMString);\n+\n+        assertNotNull(template);\n+\n+        Map<String, Object> generatedTopologyTemplate = (Map<String, Object>) template.get(DamGenerator.TOPOLOGY_TEMPLATE);\n+        Map<String, Object> expectedTopologyTemplate = (Map<String, Object>) expectedDAM.get(DamGenerator.TOPOLOGY_TEMPLATE);\n+\n+        assertEquals(generatedTopologyTemplate.get(\"www\"), expectedTopologyTemplate.get(\"www\"));\n+        assertEquals(generatedTopologyTemplate.get(\"db\"), expectedTopologyTemplate.get(\"db\"));\n+        assertEquals(generatedTopologyTemplate.get(\"Amazon_EC2_m1_small_eu_central_1\"), expectedTopologyTemplate.get(\"Amazon_EC2_m1_small_eu_central_1\"));\n+        assertEquals(generatedTopologyTemplate.get(\"Amazon_EC2_m4_10xlarge_eu_west_1\"), expectedTopologyTemplate.get(\"Amazon_EC2_m4_10xlarge_eu_west_1\"));\n+\n+        Map<String, Object> generatedGroups = (Map<String, Object>) generatedTopologyTemplate.get(DamGenerator.GROUPS);\n+        Map<String, Object> expectedGroups = (Map<String, Object>) expectedTopologyTemplate.get(DamGenerator.GROUPS);\n+\n+        assertEquals(generatedGroups.get(\"operation_www\"), expectedGroups.get(\"operation_www\"));","path":"planner/core/src/test/java/eu/seaclouds/platform/planner/core/DamGeneratorTest.java","position":41,"original_position":41,"commit_id":"210ef9247b43a414ec8bffb3533920d7515791cc","original_commit_id":"210ef9247b43a414ec8bffb3533920d7515791cc","user":{"login":"kiuby88","id":3704424,"avatar_url":"https://avatars.githubusercontent.com/u/3704424?v=3","gravatar_id":"","url":"https://api.github.com/users/kiuby88","html_url":"https://github.com/kiuby88","followers_url":"https://api.github.com/users/kiuby88/followers","following_url":"https://api.github.com/users/kiuby88/following{/other_user}","gists_url":"https://api.github.com/users/kiuby88/gists{/gist_id}","starred_url":"https://api.github.com/users/kiuby88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiuby88/subscriptions","organizations_url":"https://api.github.com/users/kiuby88/orgs","repos_url":"https://api.github.com/users/kiuby88/repos","events_url":"https://api.github.com/users/kiuby88/events{/privacy}","received_events_url":"https://api.github.com/users/kiuby88/received_events","type":"User","site_admin":false},"body":"Each property should be tested. I think `tosca.nodes.Compute` NodeTypes properties could avoided in the test but the rest of the NodeTemplates should be reviewed.\r\nPolicies and their properties should also be tested.","created_at":"2016-03-10T07:57:50Z","updated_at":"2016-03-10T07:57:50Z","html_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264#discussion_r55644372","pull_request_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264","_links":{"self":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/comments/55644372"},"html":{"href":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264#discussion_r55644372"},"pull_request":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264","id":62232610,"html_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264","diff_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264.diff","patch_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264.patch","issue_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/264","number":264,"state":"open","locked":false,"title":"Test(Planner): Added test for DAM generator","user":{"login":"PaoloCifariello","id":3831192,"avatar_url":"https://avatars.githubusercontent.com/u/3831192?v=3","gravatar_id":"","url":"https://api.github.com/users/PaoloCifariello","html_url":"https://github.com/PaoloCifariello","followers_url":"https://api.github.com/users/PaoloCifariello/followers","following_url":"https://api.github.com/users/PaoloCifariello/following{/other_user}","gists_url":"https://api.github.com/users/PaoloCifariello/gists{/gist_id}","starred_url":"https://api.github.com/users/PaoloCifariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaoloCifariello/subscriptions","organizations_url":"https://api.github.com/users/PaoloCifariello/orgs","repos_url":"https://api.github.com/users/PaoloCifariello/repos","events_url":"https://api.github.com/users/PaoloCifariello/events{/privacy}","received_events_url":"https://api.github.com/users/PaoloCifariello/received_events","type":"User","site_admin":false},"body":"I have added few tests for DAM generator.\r\nThree DAMs are produced and compared with precomputed ones.\r\n\r\n@kiuby88 can you please take a look?","created_at":"2016-03-09T14:04:18Z","updated_at":"2016-03-10T07:57:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d9b0f32f13cd9df22aa6e5fe1fc81ca5a65fe77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264/commits","review_comments_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264/comments","review_comment_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/264/comments","statuses_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/statuses/210ef9247b43a414ec8bffb3533920d7515791cc","head":{"label":"PaoloCifariello:test/dam-generator-test","ref":"test/dam-generator-test","sha":"210ef9247b43a414ec8bffb3533920d7515791cc","user":{"login":"PaoloCifariello","id":3831192,"avatar_url":"https://avatars.githubusercontent.com/u/3831192?v=3","gravatar_id":"","url":"https://api.github.com/users/PaoloCifariello","html_url":"https://github.com/PaoloCifariello","followers_url":"https://api.github.com/users/PaoloCifariello/followers","following_url":"https://api.github.com/users/PaoloCifariello/following{/other_user}","gists_url":"https://api.github.com/users/PaoloCifariello/gists{/gist_id}","starred_url":"https://api.github.com/users/PaoloCifariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaoloCifariello/subscriptions","organizations_url":"https://api.github.com/users/PaoloCifariello/orgs","repos_url":"https://api.github.com/users/PaoloCifariello/repos","events_url":"https://api.github.com/users/PaoloCifariello/events{/privacy}","received_events_url":"https://api.github.com/users/PaoloCifariello/received_events","type":"User","site_admin":false},"repo":{"id":38811485,"name":"SeaCloudsPlatform","full_name":"PaoloCifariello/SeaCloudsPlatform","owner":{"login":"PaoloCifariello","id":3831192,"avatar_url":"https://avatars.githubusercontent.com/u/3831192?v=3","gravatar_id":"","url":"https://api.github.com/users/PaoloCifariello","html_url":"https://github.com/PaoloCifariello","followers_url":"https://api.github.com/users/PaoloCifariello/followers","following_url":"https://api.github.com/users/PaoloCifariello/following{/other_user}","gists_url":"https://api.github.com/users/PaoloCifariello/gists{/gist_id}","starred_url":"https://api.github.com/users/PaoloCifariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaoloCifariello/subscriptions","organizations_url":"https://api.github.com/users/PaoloCifariello/orgs","repos_url":"https://api.github.com/users/PaoloCifariello/repos","events_url":"https://api.github.com/users/PaoloCifariello/events{/privacy}","received_events_url":"https://api.github.com/users/PaoloCifariello/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PaoloCifariello/SeaCloudsPlatform","description":"Seamless adaptive multi-cloud management of service-based applications","fork":true,"url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform","forks_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/forks","keys_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/teams","hooks_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/hooks","issue_events_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/issues/events{/number}","events_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/events","assignees_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/assignees{/user}","branches_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/branches{/branch}","tags_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/tags","blobs_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/statuses/{sha}","languages_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/languages","stargazers_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/stargazers","contributors_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/contributors","subscribers_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/subscribers","subscription_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/subscription","commits_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/contents/{+path}","compare_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/merges","archive_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/downloads","issues_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/issues{/number}","pulls_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/pulls{/number}","milestones_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/milestones{/number}","notifications_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/labels{/name}","releases_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/releases{/id}","deployments_url":"https://api.github.com/repos/PaoloCifariello/SeaCloudsPlatform/deployments","created_at":"2015-07-09T09:30:45Z","updated_at":"2016-03-07T12:46:45Z","pushed_at":"2016-03-09T13:57:59Z","git_url":"git://github.com/PaoloCifariello/SeaCloudsPlatform.git","ssh_url":"git@github.com:PaoloCifariello/SeaCloudsPlatform.git","clone_url":"https://github.com/PaoloCifariello/SeaCloudsPlatform.git","svn_url":"https://github.com/PaoloCifariello/SeaCloudsPlatform","homepage":"http://www.seaclouds-project.eu/","size":61471,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"SeaCloudsEU:master","ref":"master","sha":"f67e24ad641126dad52811ce9774a2f8fdf64d35","user":{"login":"SeaCloudsEU","id":6222853,"avatar_url":"https://avatars.githubusercontent.com/u/6222853?v=3","gravatar_id":"","url":"https://api.github.com/users/SeaCloudsEU","html_url":"https://github.com/SeaCloudsEU","followers_url":"https://api.github.com/users/SeaCloudsEU/followers","following_url":"https://api.github.com/users/SeaCloudsEU/following{/other_user}","gists_url":"https://api.github.com/users/SeaCloudsEU/gists{/gist_id}","starred_url":"https://api.github.com/users/SeaCloudsEU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeaCloudsEU/subscriptions","organizations_url":"https://api.github.com/users/SeaCloudsEU/orgs","repos_url":"https://api.github.com/users/SeaCloudsEU/repos","events_url":"https://api.github.com/users/SeaCloudsEU/events{/privacy}","received_events_url":"https://api.github.com/users/SeaCloudsEU/received_events","type":"Organization","site_admin":false},"repo":{"id":15312233,"name":"SeaCloudsPlatform","full_name":"SeaCloudsEU/SeaCloudsPlatform","owner":{"login":"SeaCloudsEU","id":6222853,"avatar_url":"https://avatars.githubusercontent.com/u/6222853?v=3","gravatar_id":"","url":"https://api.github.com/users/SeaCloudsEU","html_url":"https://github.com/SeaCloudsEU","followers_url":"https://api.github.com/users/SeaCloudsEU/followers","following_url":"https://api.github.com/users/SeaCloudsEU/following{/other_user}","gists_url":"https://api.github.com/users/SeaCloudsEU/gists{/gist_id}","starred_url":"https://api.github.com/users/SeaCloudsEU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeaCloudsEU/subscriptions","organizations_url":"https://api.github.com/users/SeaCloudsEU/orgs","repos_url":"https://api.github.com/users/SeaCloudsEU/repos","events_url":"https://api.github.com/users/SeaCloudsEU/events{/privacy}","received_events_url":"https://api.github.com/users/SeaCloudsEU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform","description":"Seamless adaptive multi-cloud management of service-based applications","fork":false,"url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform","forks_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/forks","keys_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/teams","hooks_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/hooks","issue_events_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/events{/number}","events_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/events","assignees_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/assignees{/user}","branches_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/branches{/branch}","tags_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/tags","blobs_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/git/refs{/sha}","trees_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/statuses/{sha}","languages_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/languages","stargazers_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/stargazers","contributors_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/contributors","subscribers_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/subscribers","subscription_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/subscription","commits_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/commits{/sha}","git_commits_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/git/commits{/sha}","comments_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/comments{/number}","issue_comment_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/comments{/number}","contents_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/contents/{+path}","compare_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/merges","archive_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/downloads","issues_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues{/number}","pulls_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls{/number}","milestones_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/milestones{/number}","notifications_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/labels{/name}","releases_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/releases{/id}","deployments_url":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/deployments","created_at":"2013-12-19T13:23:54Z","updated_at":"2016-02-25T22:07:24Z","pushed_at":"2016-03-09T16:37:46Z","git_url":"git://github.com/SeaCloudsEU/SeaCloudsPlatform.git","ssh_url":"git@github.com:SeaCloudsEU/SeaCloudsPlatform.git","clone_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform.git","svn_url":"https://github.com/SeaCloudsEU/SeaCloudsPlatform","homepage":"http://www.seaclouds-project.eu/","size":129079,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":15,"forks":16,"open_issues":15,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264"},"html":{"href":"https://github.com/SeaCloudsEU/SeaCloudsPlatform/pull/264"},"issue":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/264"},"comments":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/SeaCloudsEU/SeaCloudsPlatform/statuses/210ef9247b43a414ec8bffb3533920d7515791cc"}}}}