### Question:
GithubPlatformIdParser { public static String extractIssueNumber(final String platformId) { return extract(platformId, ISSUE_NUMBER_GROUP_NAME); } GithubPlatformIdParser(GithubGateway githubGateway); static String extractOwner(final String platformId); static String extractRepo(String platformId); static String extractIssueNumber(final String platformId); IssueInformation parseIssue(String platformId); static final String PLATFORM_ID_GITHUB_DELIMTER; }### Answer:
@Test public void extractIssueNumber() { final String owner = "sgsgsg"; final String repo = "utyejy"; final String issueNumber = "6453"; final String result = GithubPlatformIdParser.extractIssueNumber(owner + "|FR|" + repo + "|FR|" + issueNumber); assertThat(result).isEqualTo(issueNumber); }
@Test public void extractIssueNumber_invalidPlatformId() { final String platformId = "sgsgsg|FR|utyejy"; assertThatIllegalArgumentException().isThrownBy(() -> GithubPlatformIdParser.extractIssueNumber(platformId)) .withMessage("platformId '" + platformId + "' has an invalid format, <issueNumber> could not be extracted"); }