### Question:
TeamGitStatus { public String toJson() { final JSONObject jsonObject = JSONObject.fromObject(this); final String result = jsonObject.toString(); return result; }  static TeamGitStatus fromRun(@Nonnull final Run<?, ?> run); static TeamGitStatus fromJob(@Nonnull final Job job); String toJson(); public GitStatusState state; public String description; public String targetUrl; public GitStatusContext context; }### Answer:
@Test public void toJson_typical() { final TeamGitStatus cut = new TeamGitStatus(); cut.state = GitStatusState.Pending; cut.description = "The build is in progress"; cut.targetUrl = "https: cut.context = new GitStatusContext("Build124", "continuous-integration"); final String actual = cut.toJson(); final String expected = "{" + "\"state\":\"Pending\"," + "\"description\":\"The build is in progress\"," + "\"targetUrl\":\"https: "\"context\":" + "{" + "\"name\":\"Build124\"," + "\"genre\":\"continuous-integration\"" + "}" + "}"; Assert.assertEquals(expected, actual); }