{"action":"created","comment":{"url":"https://api.github.com/repos/google/nomulus/pulls/comments/91738300","pull_request_review_id":12249934,"id":91738300,"diff_hunk":"@@ -67,27 +69,65 @@ public void testBackupKinds_matchGoldenBackupKindsFile() throws Exception {\n               }})\n         .toList();\n     ImmutableSet<String> actualKinds = ExportConstants.getBackupKinds();\n-    String updateInstructions = String.format(\n-        UPDATE_INSTRUCTIONS_TEMPLATE,\n-        goldenBackupKindsResource.toString(),\n-        Joiner.on('\\n').join(actualKinds));\n+    String updateInstructions = getUpdateInstructions(\"backed-up\",\n+        goldenBackupKindsResource.toString(), actualKinds );\n     assertWithMessage(updateInstructions)\n         .that(actualKinds)\n         .containsExactlyElementsIn(goldenKinds)\n         .inOrder();\n   }\n \n   @Test\n+  public void testReportingKinds_matchGoldenReportingKindsFile() throws Exception {\n+    URL goldenReportingKindsResource =\n+        getResource(ExportConstantsTest.class, GOLDEN_REPORTING_KINDS_FILENAME);\n+    final Pattern stripComments = Pattern.compile(\"\\\\s*#.*$\");\n+    List<String> goldenReportingKinds = FluentIterable\n+        .from(Splitter.on('\\n').split(\n+            Resources.toString(goldenReportingKindsResource, UTF_8).trim()))\n+        .transform(\n+            new Function<String, String>() {\n+              @Override @Nullable public String apply(@Nullable String line) {\n+                return stripComments.matcher(line).replaceFirst(\"\");\n+              }})\n+        .toList();\n+    ImmutableSet<String> actualKinds = ExportConstants.getReportingKinds();\n+    String updateInstructions = getUpdateInstructions(\"reporting\",\n+        goldenReportingKindsResource.toString(), actualKinds );\n+    assertWithMessage(updateInstructions)\n+        .that(actualKinds)\n+        .containsExactlyElementsIn(goldenReportingKinds)\n+        .inOrder();\n+  }\n+\n+  @Test\n   public void testReportingKinds_areSubsetOfBackupKinds() throws Exception {\n     assertThat(ExportConstants.getBackupKinds()).containsAllIn(ExportConstants.getReportingKinds());\n   }\n \n-  @Test\n-  public void testReportingEntityClasses_areAllBaseEntityClasses() throws Exception {\n-    for (Class<? extends ImmutableObject> clazz : ExportConstants.REPORTING_ENTITY_CLASSES) {\n-      assertThat(clazz.isAnnotationPresent(Entity.class))\n-          .named(String.format(\"class %s is an @Entity\", clazz.getSimpleName()))\n-          .isTrue();\n-    }\n+  @Test \n+  public void testReportingKinds_areSubsetOfEntityClasses() throws Exception {  \n+    ImmutableSet<String> entityClasses =  FluentIterable.from(EntityClasses.ALL_CLASSES) \n+        .filter(hasAnnotation(Entity.class)) \n+        .transform(CLASS_TO_KIND_FUNCTION) \n+        .toSortedSet(Ordering.natural()); \n+    assertThat(entityClasses).containsAllIn(ExportConstants.getReportingKinds())\n+   }\n+\n+  /**\n+   * Helper method to get update instructions\n+   *\n+   * @param name - type of entity\n+   * @param resource - Resource file contents\n+   * @param actualKinds - data from ExportConstants\n+   * @return String of update instructions\n+   */\n+  private String getUpdateInstructions(String name, String resource,\n+                                       ImmutableSet<String> actualKinds){\n+    return String.format(\n+        UPDATE_KINDS_INSTRUCTIONS_TEMPLATE,\n+        \"reporting\",","path":"javatests/google/registry/export/ExportConstantsTest.java","position":86,"original_position":86,"commit_id":"eaed81dcdefaa5f706becfbcfedd62f174b1eb15","original_commit_id":"eaed81dcdefaa5f706becfbcfedd62f174b1eb15","user":{"login":"tjohnson79","id":17604371,"avatar_url":"https://avatars.githubusercontent.com/u/17604371?v=3","gravatar_id":"","url":"https://api.github.com/users/tjohnson79","html_url":"https://github.com/tjohnson79","followers_url":"https://api.github.com/users/tjohnson79/followers","following_url":"https://api.github.com/users/tjohnson79/following{/other_user}","gists_url":"https://api.github.com/users/tjohnson79/gists{/gist_id}","starred_url":"https://api.github.com/users/tjohnson79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjohnson79/subscriptions","organizations_url":"https://api.github.com/users/tjohnson79/orgs","repos_url":"https://api.github.com/users/tjohnson79/repos","events_url":"https://api.github.com/users/tjohnson79/events{/privacy}","received_events_url":"https://api.github.com/users/tjohnson79/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2016-12-09T15:40:35Z","updated_at":"2016-12-09T15:40:35Z","html_url":"https://github.com/google/nomulus/pull/44#discussion_r91738300","pull_request_url":"https://api.github.com/repos/google/nomulus/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/google/nomulus/pulls/comments/91738300"},"html":{"href":"https://github.com/google/nomulus/pull/44#discussion_r91738300"},"pull_request":{"href":"https://api.github.com/repos/google/nomulus/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/google/nomulus/pulls/44","id":97003832,"html_url":"https://github.com/google/nomulus/pull/44","diff_url":"https://github.com/google/nomulus/pull/44.diff","patch_url":"https://github.com/google/nomulus/pull/44.patch","issue_url":"https://api.github.com/repos/google/nomulus/issues/44","number":44,"state":"open","locked":false,"title":"Add ReportedOn annotation for big query export","user":{"login":"tjohnson79","id":17604371,"avatar_url":"https://avatars.githubusercontent.com/u/17604371?v=3","gravatar_id":"","url":"https://api.github.com/users/tjohnson79","html_url":"https://github.com/tjohnson79","followers_url":"https://api.github.com/users/tjohnson79/followers","following_url":"https://api.github.com/users/tjohnson79/following{/other_user}","gists_url":"https://api.github.com/users/tjohnson79/gists{/gist_id}","starred_url":"https://api.github.com/users/tjohnson79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjohnson79/subscriptions","organizations_url":"https://api.github.com/users/tjohnson79/orgs","repos_url":"https://api.github.com/users/tjohnson79/repos","events_url":"https://api.github.com/users/tjohnson79/events{/privacy}","received_events_url":"https://api.github.com/users/tjohnson79/received_events","type":"User","site_admin":false},"body":"Adding annotation for use in BigQuery export. \r\nReplaced all classes listed in ExportConstants map with annotation @ReportedOn\r\nand update the method getReportingKinds() to retrieve information via annotations vs set.\r\n","created_at":"2016-12-07T20:47:06Z","updated_at":"2016-12-09T15:40:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2069598595b203491544bac1008026eb1e4b5ac","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/nomulus/pulls/44/commits","review_comments_url":"https://api.github.com/repos/google/nomulus/pulls/44/comments","review_comment_url":"https://api.github.com/repos/google/nomulus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/nomulus/issues/44/comments","statuses_url":"https://api.github.com/repos/google/nomulus/statuses/eaed81dcdefaa5f706becfbcfedd62f174b1eb15","head":{"label":"tjohnson79:Add-ReportedOn-Annotations-For-BigQuery-ReportingKinds","ref":"Add-ReportedOn-Annotations-For-BigQuery-ReportingKinds","sha":"eaed81dcdefaa5f706becfbcfedd62f174b1eb15","user":{"login":"tjohnson79","id":17604371,"avatar_url":"https://avatars.githubusercontent.com/u/17604371?v=3","gravatar_id":"","url":"https://api.github.com/users/tjohnson79","html_url":"https://github.com/tjohnson79","followers_url":"https://api.github.com/users/tjohnson79/followers","following_url":"https://api.github.com/users/tjohnson79/following{/other_user}","gists_url":"https://api.github.com/users/tjohnson79/gists{/gist_id}","starred_url":"https://api.github.com/users/tjohnson79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjohnson79/subscriptions","organizations_url":"https://api.github.com/users/tjohnson79/orgs","repos_url":"https://api.github.com/users/tjohnson79/repos","events_url":"https://api.github.com/users/tjohnson79/events{/privacy}","received_events_url":"https://api.github.com/users/tjohnson79/received_events","type":"User","site_admin":false},"repo":{"id":75758149,"name":"nomulus","full_name":"tjohnson79/nomulus","owner":{"login":"tjohnson79","id":17604371,"avatar_url":"https://avatars.githubusercontent.com/u/17604371?v=3","gravatar_id":"","url":"https://api.github.com/users/tjohnson79","html_url":"https://github.com/tjohnson79","followers_url":"https://api.github.com/users/tjohnson79/followers","following_url":"https://api.github.com/users/tjohnson79/following{/other_user}","gists_url":"https://api.github.com/users/tjohnson79/gists{/gist_id}","starred_url":"https://api.github.com/users/tjohnson79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjohnson79/subscriptions","organizations_url":"https://api.github.com/users/tjohnson79/orgs","repos_url":"https://api.github.com/users/tjohnson79/repos","events_url":"https://api.github.com/users/tjohnson79/events{/privacy}","received_events_url":"https://api.github.com/users/tjohnson79/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjohnson79/nomulus","description":"Top-level domain name registry service on Google App Engine","fork":true,"url":"https://api.github.com/repos/tjohnson79/nomulus","forks_url":"https://api.github.com/repos/tjohnson79/nomulus/forks","keys_url":"https://api.github.com/repos/tjohnson79/nomulus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjohnson79/nomulus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjohnson79/nomulus/teams","hooks_url":"https://api.github.com/repos/tjohnson79/nomulus/hooks","issue_events_url":"https://api.github.com/repos/tjohnson79/nomulus/issues/events{/number}","events_url":"https://api.github.com/repos/tjohnson79/nomulus/events","assignees_url":"https://api.github.com/repos/tjohnson79/nomulus/assignees{/user}","branches_url":"https://api.github.com/repos/tjohnson79/nomulus/branches{/branch}","tags_url":"https://api.github.com/repos/tjohnson79/nomulus/tags","blobs_url":"https://api.github.com/repos/tjohnson79/nomulus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjohnson79/nomulus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjohnson79/nomulus/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjohnson79/nomulus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjohnson79/nomulus/statuses/{sha}","languages_url":"https://api.github.com/repos/tjohnson79/nomulus/languages","stargazers_url":"https://api.github.com/repos/tjohnson79/nomulus/stargazers","contributors_url":"https://api.github.com/repos/tjohnson79/nomulus/contributors","subscribers_url":"https://api.github.com/repos/tjohnson79/nomulus/subscribers","subscription_url":"https://api.github.com/repos/tjohnson79/nomulus/subscription","commits_url":"https://api.github.com/repos/tjohnson79/nomulus/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjohnson79/nomulus/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjohnson79/nomulus/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjohnson79/nomulus/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjohnson79/nomulus/contents/{+path}","compare_url":"https://api.github.com/repos/tjohnson79/nomulus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjohnson79/nomulus/merges","archive_url":"https://api.github.com/repos/tjohnson79/nomulus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjohnson79/nomulus/downloads","issues_url":"https://api.github.com/repos/tjohnson79/nomulus/issues{/number}","pulls_url":"https://api.github.com/repos/tjohnson79/nomulus/pulls{/number}","milestones_url":"https://api.github.com/repos/tjohnson79/nomulus/milestones{/number}","notifications_url":"https://api.github.com/repos/tjohnson79/nomulus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjohnson79/nomulus/labels{/name}","releases_url":"https://api.github.com/repos/tjohnson79/nomulus/releases{/id}","deployments_url":"https://api.github.com/repos/tjohnson79/nomulus/deployments","created_at":"2016-12-06T18:11:27Z","updated_at":"2016-12-06T18:11:34Z","pushed_at":"2016-12-08T23:39:20Z","git_url":"git://github.com/tjohnson79/nomulus.git","ssh_url":"git@github.com:tjohnson79/nomulus.git","clone_url":"https://github.com/tjohnson79/nomulus.git","svn_url":"https://github.com/tjohnson79/nomulus","homepage":"https://registry.google","size":8735,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"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":"google:master","ref":"master","sha":"bd0e4f834bf08e52ba844e8d4d8c191a02207786","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":52821506,"name":"nomulus","full_name":"google/nomulus","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/nomulus","description":"Top-level domain name registry service on Google App Engine","fork":false,"url":"https://api.github.com/repos/google/nomulus","forks_url":"https://api.github.com/repos/google/nomulus/forks","keys_url":"https://api.github.com/repos/google/nomulus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/nomulus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/nomulus/teams","hooks_url":"https://api.github.com/repos/google/nomulus/hooks","issue_events_url":"https://api.github.com/repos/google/nomulus/issues/events{/number}","events_url":"https://api.github.com/repos/google/nomulus/events","assignees_url":"https://api.github.com/repos/google/nomulus/assignees{/user}","branches_url":"https://api.github.com/repos/google/nomulus/branches{/branch}","tags_url":"https://api.github.com/repos/google/nomulus/tags","blobs_url":"https://api.github.com/repos/google/nomulus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/nomulus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/nomulus/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/nomulus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/nomulus/statuses/{sha}","languages_url":"https://api.github.com/repos/google/nomulus/languages","stargazers_url":"https://api.github.com/repos/google/nomulus/stargazers","contributors_url":"https://api.github.com/repos/google/nomulus/contributors","subscribers_url":"https://api.github.com/repos/google/nomulus/subscribers","subscription_url":"https://api.github.com/repos/google/nomulus/subscription","commits_url":"https://api.github.com/repos/google/nomulus/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/nomulus/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/nomulus/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/nomulus/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/nomulus/contents/{+path}","compare_url":"https://api.github.com/repos/google/nomulus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/nomulus/merges","archive_url":"https://api.github.com/repos/google/nomulus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/nomulus/downloads","issues_url":"https://api.github.com/repos/google/nomulus/issues{/number}","pulls_url":"https://api.github.com/repos/google/nomulus/pulls{/number}","milestones_url":"https://api.github.com/repos/google/nomulus/milestones{/number}","notifications_url":"https://api.github.com/repos/google/nomulus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/nomulus/labels{/name}","releases_url":"https://api.github.com/repos/google/nomulus/releases{/id}","deployments_url":"https://api.github.com/repos/google/nomulus/deployments","created_at":"2016-02-29T20:16:48Z","updated_at":"2016-12-06T13:11:02Z","pushed_at":"2016-12-08T23:39:21Z","git_url":"git://github.com/google/nomulus.git","ssh_url":"git@github.com:google/nomulus.git","clone_url":"https://github.com/google/nomulus.git","svn_url":"https://github.com/google/nomulus","homepage":"https://registry.google","size":9768,"stargazers_count":817,"watchers_count":817,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":71,"mirror_url":null,"open_issues_count":7,"forks":71,"open_issues":7,"watchers":817,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/nomulus/pulls/44"},"html":{"href":"https://github.com/google/nomulus/pull/44"},"issue":{"href":"https://api.github.com/repos/google/nomulus/issues/44"},"comments":{"href":"https://api.github.com/repos/google/nomulus/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/google/nomulus/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/google/nomulus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/nomulus/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/google/nomulus/statuses/eaed81dcdefaa5f706becfbcfedd62f174b1eb15"}}}}
{"actor":{"display_login":"tjohnson79"}}