### Question:
GithubStatusResolver { public String resolve(final Document document) { return document.select("#partial-discussion-header .State").first().text(); }  String resolve(final Document document);  }### Answer:
@Test public void parseOpen() { final Document document = mock(Document.class, RETURNS_DEEP_STUBS); final String expectedStatus = "Open"; when(document.select("#partial-discussion-header .State").first().text()).thenReturn(expectedStatus); final String returnedStatus = parser.resolve(document); assertThat(returnedStatus).isEqualTo(expectedStatus); }
@Test public void parseClosed() { final Document document = mock(Document.class, RETURNS_DEEP_STUBS); final String expectedStatus = "Closed"; when(document.select("#partial-discussion-header .State").first().text()).thenReturn(expectedStatus); final String returnedStatus = parser.resolve(document); assertThat(returnedStatus).isEqualTo(expectedStatus); }