diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java
index cdef41090..5041b4f6b 100755
--- a/src/test/java/org/kohsuke/github/AppTest.java
+++ b/src/test/java/org/kohsuke/github/AppTest.java
@@ -245,7 +245,7 @@ public class AppTest extends AbstractGitHubWireMockTest {
assertEquals(teamByName.getId(), teamById.getId());
assertEquals(teamByName.getDescription(), teamById.getDescription());
}
-
+
@Test
public void testShouldFetchTeamFromOrganization() throws Exception {
GHOrganization organization = gitHub.getOrganization(GITHUB_API_TEST_ORG);
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/__files/teams_820406-9302cc40-d07a-4ad2-b958-f035a849e3fb.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/__files/teams_820406-9302cc40-d07a-4ad2-b958-f035a849e3fb.json
new file mode 100644
index 000000000..7f7d10b38
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/__files/teams_820406-9302cc40-d07a-4ad2-b958-f035a849e3fb.json
@@ -0,0 +1,43 @@
+{
+ "name": "Core Developers",
+ "id": 820406,
+ "node_id": "MDQ6VGVhbTgyMDQwNg==",
+ "slug": "core-developers",
+ "description": "A random team",
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/820406",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers",
+ "members_url": "https://api.github.com/organizations/7544739/team/820406/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/820406/repos",
+ "permission": "pull",
+ "created_at": "2014-05-10T19:40:03Z",
+ "updated_at": "2014-05-10T19:40:03Z",
+ "members_count": 1,
+ "repos_count": 1,
+ "organization": {
+ "login": "github-api-test-org",
+ "id": 7544739,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+ "url": "https://api.github.com/orgs/github-api-test-org",
+ "repos_url": "https://api.github.com/orgs/github-api-test-org/repos",
+ "events_url": "https://api.github.com/orgs/github-api-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/github-api-test-org/issues",
+ "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 26,
+ "public_gists": 0,
+ "followers": 0,
+ "following": 0,
+ "html_url": "https://github.com/github-api-test-org",
+ "created_at": "2014-05-10T19:39:11Z",
+ "updated_at": "2015-04-20T00:42:30Z",
+ "type": "Organization"
+ },
+ "parent": null
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/mappings/teams_820406-8-9302cc.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/mappings/teams_820406-8-9302cc.json
new file mode 100644
index 000000000..a4c14cf1d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeam/mappings/teams_820406-8-9302cc.json
@@ -0,0 +1,49 @@
+{
+ "id": "9302cc40-d07a-4ad2-b958-f035a849e3fb",
+ "name": "teams_820406",
+ "request": {
+ "url": "/teams/820406",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "teams_820406-9302cc40-d07a-4ad2-b958-f035a849e3fb.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 17 Mar 2020 21:35:48 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4991",
+ "X-RateLimit-Reset": "1584484224",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"1201d96396c062b2208db689dc6a3887\"",
+ "Last-Modified": "Sat, 10 May 2014 19:40:03 GMT",
+ "X-OAuth-Scopes": "admin:org, admin:public_key, admin:repo_hook, notifications, repo, user",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "unknown, github.v3",
+ "Deprecation": "Sat, 01 Feb 2020 00:00:00 GMT",
+ "Sunset": "Mon, 01 Feb 2021 00:00:00 GMT",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CA8E:731C:FD772:25F150:5E7142B3",
+ "Link": "; rel=\"deprecation\"; type=\"text/html\", ; rel=\"alternate\""
+ }
+ },
+ "uuid": "9302cc40-d07a-4ad2-b958-f035a849e3fb",
+ "persistent": true,
+ "insertionIndex": 8
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/organizations_7544739_team_820406-ba773c31-6b20-4c65-9c67-e9fd89ea6bdd.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/organizations_7544739_team_820406-ba773c31-6b20-4c65-9c67-e9fd89ea6bdd.json
new file mode 100644
index 000000000..7f7d10b38
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/organizations_7544739_team_820406-ba773c31-6b20-4c65-9c67-e9fd89ea6bdd.json
@@ -0,0 +1,43 @@
+{
+ "name": "Core Developers",
+ "id": 820406,
+ "node_id": "MDQ6VGVhbTgyMDQwNg==",
+ "slug": "core-developers",
+ "description": "A random team",
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/820406",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers",
+ "members_url": "https://api.github.com/organizations/7544739/team/820406/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/820406/repos",
+ "permission": "pull",
+ "created_at": "2014-05-10T19:40:03Z",
+ "updated_at": "2014-05-10T19:40:03Z",
+ "members_count": 1,
+ "repos_count": 1,
+ "organization": {
+ "login": "github-api-test-org",
+ "id": 7544739,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+ "url": "https://api.github.com/orgs/github-api-test-org",
+ "repos_url": "https://api.github.com/orgs/github-api-test-org/repos",
+ "events_url": "https://api.github.com/orgs/github-api-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/github-api-test-org/issues",
+ "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 26,
+ "public_gists": 0,
+ "followers": 0,
+ "following": 0,
+ "html_url": "https://github.com/github-api-test-org",
+ "created_at": "2014-05-10T19:39:11Z",
+ "updated_at": "2015-04-20T00:42:30Z",
+ "type": "Organization"
+ },
+ "parent": null
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org-1e6ccae5-0db6-47c0-89bc-5c1f2d862b63.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org-1e6ccae5-0db6-47c0-89bc-5c1f2d862b63.json
new file mode 100644
index 000000000..97f95f3f4
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org-1e6ccae5-0db6-47c0-89bc-5c1f2d862b63.json
@@ -0,0 +1,41 @@
+{
+ "login": "github-api-test-org",
+ "id": 7544739,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+ "url": "https://api.github.com/orgs/github-api-test-org",
+ "repos_url": "https://api.github.com/orgs/github-api-test-org/repos",
+ "events_url": "https://api.github.com/orgs/github-api-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/github-api-test-org/issues",
+ "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 26,
+ "public_gists": 0,
+ "followers": 0,
+ "following": 0,
+ "html_url": "https://github.com/github-api-test-org",
+ "created_at": "2014-05-10T19:39:11Z",
+ "updated_at": "2015-04-20T00:42:30Z",
+ "type": "Organization",
+ "total_private_repos": 0,
+ "owned_private_repos": 0,
+ "private_gists": 0,
+ "disk_usage": 147,
+ "collaborators": 0,
+ "billing_email": "kk@kohsuke.org",
+ "default_repository_permission": "none",
+ "members_can_create_repositories": false,
+ "two_factor_requirement_enabled": false,
+ "plan": {
+ "name": "free",
+ "space": 976562499,
+ "private_repos": 0,
+ "filled_seats": 14,
+ "seats": 0
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org_teams-e2aa00b9-f24e-4650-8341-7f08ec5aea99.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org_teams-e2aa00b9-f24e-4650-8341-7f08ec5aea99.json
new file mode 100644
index 000000000..d11e271bc
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/orgs_github-api-test-org_teams-e2aa00b9-f24e-4650-8341-7f08ec5aea99.json
@@ -0,0 +1,58 @@
+[
+ {
+ "name": "Core Developers",
+ "id": 820406,
+ "node_id": "MDQ6VGVhbTgyMDQwNg==",
+ "slug": "core-developers",
+ "description": "A random team",
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/820406",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers",
+ "members_url": "https://api.github.com/organizations/7544739/team/820406/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/820406/repos",
+ "permission": "pull",
+ "parent": null
+ },
+ {
+ "name": "dummy-team",
+ "id": 3451996,
+ "node_id": "MDQ6VGVhbTM0NTE5OTY=",
+ "slug": "dummy-team",
+ "description": "Updated by API TestModified",
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/3451996",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team",
+ "members_url": "https://api.github.com/organizations/7544739/team/3451996/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/3451996/repos",
+ "permission": "pull",
+ "parent": null
+ },
+ {
+ "name": "Owners-team",
+ "id": 820404,
+ "node_id": "MDQ6VGVhbTgyMDQwNA==",
+ "slug": "owners-team",
+ "description": null,
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/820404",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/owners-team",
+ "members_url": "https://api.github.com/organizations/7544739/team/820404/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/820404/repos",
+ "permission": "admin",
+ "parent": null
+ },
+ {
+ "name": "tricky-team",
+ "id": 3454508,
+ "node_id": "MDQ6VGVhbTM0NTQ1MDg=",
+ "slug": "tricky-team",
+ "description": "",
+ "privacy": "secret",
+ "url": "https://api.github.com/organizations/7544739/team/3454508",
+ "html_url": "https://github.com/orgs/github-api-test-org/teams/tricky-team",
+ "members_url": "https://api.github.com/organizations/7544739/team/3454508/members{/member}",
+ "repositories_url": "https://api.github.com/organizations/7544739/team/3454508/repos",
+ "permission": "pull",
+ "parent": null
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/user-09eec5a0-4b1d-4afe-85d3-5413eb288548.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/user-09eec5a0-4b1d-4afe-85d3-5413eb288548.json
new file mode 100644
index 000000000..3ed6e3f00
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/__files/user-09eec5a0-4b1d-4afe-85d3-5413eb288548.json
@@ -0,0 +1,45 @@
+{
+ "login": "ingwarsw",
+ "id": 5390156,
+ "node_id": "MDQ6VXNlcjUzOTAxNTY=",
+ "avatar_url": "https://avatars2.githubusercontent.com/u/5390156?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/ingwarsw",
+ "html_url": "https://github.com/ingwarsw",
+ "followers_url": "https://api.github.com/users/ingwarsw/followers",
+ "following_url": "https://api.github.com/users/ingwarsw/following{/other_user}",
+ "gists_url": "https://api.github.com/users/ingwarsw/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/ingwarsw/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/ingwarsw/subscriptions",
+ "organizations_url": "https://api.github.com/users/ingwarsw/orgs",
+ "repos_url": "https://api.github.com/users/ingwarsw/repos",
+ "events_url": "https://api.github.com/users/ingwarsw/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/ingwarsw/received_events",
+ "type": "User",
+ "site_admin": false,
+ "name": "Karol Lassak",
+ "company": "Ingwar & co.",
+ "blog": "ingwar.eu.org",
+ "location": "Warsaw, Poland",
+ "email": "ingwar@ingwar.eu.org",
+ "hireable": true,
+ "bio": null,
+ "public_repos": 38,
+ "public_gists": 0,
+ "followers": 14,
+ "following": 3,
+ "created_at": "2013-09-05T09:58:28Z",
+ "updated_at": "2020-03-17T08:28:47Z",
+ "private_gists": 3,
+ "total_private_repos": 3,
+ "owned_private_repos": 3,
+ "disk_usage": 83478,
+ "collaborators": 4,
+ "two_factor_authentication": true,
+ "plan": {
+ "name": "free",
+ "space": 976562499,
+ "collaborators": 0,
+ "private_repos": 10000
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/organizations_7544739_team_820406-4-ba773c.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/organizations_7544739_team_820406-4-ba773c.json
new file mode 100644
index 000000000..6f46dc1dd
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/organizations_7544739_team_820406-4-ba773c.json
@@ -0,0 +1,46 @@
+{
+ "id": "ba773c31-6b20-4c65-9c67-e9fd89ea6bdd",
+ "name": "organizations_7544739_team_820406",
+ "request": {
+ "url": "/organizations/7544739/team/820406",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "organizations_7544739_team_820406-ba773c31-6b20-4c65-9c67-e9fd89ea6bdd.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 17 Mar 2020 21:36:28 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4986",
+ "X-RateLimit-Reset": "1584484224",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"1201d96396c062b2208db689dc6a3887\"",
+ "Last-Modified": "Sat, 10 May 2014 19:40:03 GMT",
+ "X-OAuth-Scopes": "admin:org, admin:public_key, admin:repo_hook, notifications, repo, user",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "unknown, github.v3",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CA95:081B:10E156:25E8CE:5E7142DB"
+ }
+ },
+ "uuid": "ba773c31-6b20-4c65-9c67-e9fd89ea6bdd",
+ "persistent": true,
+ "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org-2-1e6cca.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org-2-1e6cca.json
new file mode 100644
index 000000000..746cac502
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org-2-1e6cca.json
@@ -0,0 +1,46 @@
+{
+ "id": "1e6ccae5-0db6-47c0-89bc-5c1f2d862b63",
+ "name": "orgs_github-api-test-org",
+ "request": {
+ "url": "/orgs/github-api-test-org",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "orgs_github-api-test-org-1e6ccae5-0db6-47c0-89bc-5c1f2d862b63.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 17 Mar 2020 21:36:27 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4988",
+ "X-RateLimit-Reset": "1584484223",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"3aa57f9a6ec0d8e1d1dfbcb665852c3a\"",
+ "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT",
+ "X-OAuth-Scopes": "admin:org, admin:public_key, admin:repo_hook, notifications, repo, user",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "unknown, github.v3",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CA95:081B:10E13F:25E832:5E7142DA"
+ }
+ },
+ "uuid": "1e6ccae5-0db6-47c0-89bc-5c1f2d862b63",
+ "persistent": true,
+ "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org_teams-3-e2aa00.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org_teams-3-e2aa00.json
new file mode 100644
index 000000000..5e3489042
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/orgs_github-api-test-org_teams-3-e2aa00.json
@@ -0,0 +1,45 @@
+{
+ "id": "e2aa00b9-f24e-4650-8341-7f08ec5aea99",
+ "name": "orgs_github-api-test-org_teams",
+ "request": {
+ "url": "/orgs/github-api-test-org/teams",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "orgs_github-api-test-org_teams-e2aa00b9-f24e-4650-8341-7f08ec5aea99.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 17 Mar 2020 21:36:27 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4987",
+ "X-RateLimit-Reset": "1584484223",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"54e42fc30d88d2a30340b56bbe54f211\"",
+ "X-OAuth-Scopes": "admin:org, admin:public_key, admin:repo_hook, notifications, repo, user",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "unknown, github.v3",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CA95:081B:10E14F:25E8B9:5E7142DB"
+ }
+ },
+ "uuid": "e2aa00b9-f24e-4650-8341-7f08ec5aea99",
+ "persistent": true,
+ "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/user-1-09eec5.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/user-1-09eec5.json
new file mode 100644
index 000000000..a3cde0029
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testShouldFetchTeamFromOrganization/mappings/user-1-09eec5.json
@@ -0,0 +1,46 @@
+{
+ "id": "09eec5a0-4b1d-4afe-85d3-5413eb288548",
+ "name": "user",
+ "request": {
+ "url": "/user",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "user-09eec5a0-4b1d-4afe-85d3-5413eb288548.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Tue, 17 Mar 2020 21:36:26 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Status": "200 OK",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4990",
+ "X-RateLimit-Reset": "1584484223",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"9017502e8d08bc162064261819da0490\"",
+ "Last-Modified": "Tue, 17 Mar 2020 08:28:47 GMT",
+ "X-OAuth-Scopes": "admin:org, admin:public_key, admin:repo_hook, notifications, repo, user",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "unknown, github.v3",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CA95:081B:10E0FE:25E811:5E7142DA"
+ }
+ },
+ "uuid": "09eec5a0-4b1d-4afe-85d3-5413eb288548",
+ "persistent": true,
+ "insertionIndex": 1
+}
\ No newline at end of file