// Path: src/test/java/com/natpryce/worktorule/IssuesParsingContract.java
// public abstract class IssuesParsingContract {
//     ObjectMapper objectMapper = new ObjectMapper();
//     Mutator<String> mutator = new JsonMutator().forStrings();
//     private final IssueJsonPredicate issueIsOpen;
// 
//     protected IssuesParsingContract(IssueJsonPredicate issueIsOpen) {
//         this.issueIsOpen = issueIsOpen;
//     }
// 
//     @Test
//     public void shouldFailGracefully() throws IOException {
//         String issueJson = Resources.toString(getClass().getResource("issue.json"), Charset.defaultCharset());
// 
//         for (String mutatedJson : mutator.mutate(issueJson, 250)) {
//             assertFailsGracefullyWhenBadJson(issueIsOpen, mutatedJson);
//         }
//     }
// 
//     protected void assertFailsGracefullyWhenBadJson(IssueJsonPredicate issueIsOpen, String mutatedJson) throws IOException {
//         JsonNode mutatedNode = objectMapper.readTree(mutatedJson);
// 
//         try {
//             issueIsOpen.isOpen(mutatedNode);
//             // ok
//         } catch (JsonMappingException e) {
//             // ok
//         } catch (RuntimeException e) {
//             AssertionError failure = new AssertionError("should have failed gracefully for JSON:\n" + mutatedJson);
//             failure.initCause(e);
//             throw failure;
//         }
//     }
// }


import com.natpryce.worktorule.IssuesParsingContract;
package com.natpryce.worktorule.issues.github;



public class GitHubIssuesParsingTest extends IssuesParsingContract {
    public GitHubIssuesParsingTest() {
// Path: src/test/java/com/natpryce/worktorule/IssuesParsingContract.java
// public abstract class IssuesParsingContract {
//     ObjectMapper objectMapper = new ObjectMapper();
//     Mutator<String> mutator = new JsonMutator().forStrings();
//     private final IssueJsonPredicate issueIsOpen;
// 
//     protected IssuesParsingContract(IssueJsonPredicate issueIsOpen) {
//         this.issueIsOpen = issueIsOpen;
//     }
// 
//     @Test
//     public void shouldFailGracefully() throws IOException {
//         String issueJson = Resources.toString(getClass().getResource("issue.json"), Charset.defaultCharset());
// 
//         for (String mutatedJson : mutator.mutate(issueJson, 250)) {
//             assertFailsGracefullyWhenBadJson(issueIsOpen, mutatedJson);
//         }
//     }
// 
//     protected void assertFailsGracefullyWhenBadJson(IssueJsonPredicate issueIsOpen, String mutatedJson) throws IOException {
//         JsonNode mutatedNode = objectMapper.readTree(mutatedJson);
// 
//         try {
//             issueIsOpen.isOpen(mutatedNode);
//             // ok
//         } catch (JsonMappingException e) {
//             // ok
//         } catch (RuntimeException e) {
//             AssertionError failure = new AssertionError("should have failed gracefully for JSON:\n" + mutatedJson);
//             failure.initCause(e);
//             throw failure;
//         }
//     }
// }


// Path: src/test/java/com/natpryce/worktorule/issues/github/GitHubIssuesParsingTest.java
import com.natpryce.worktorule.IssuesParsingContract;

package com.natpryce.worktorule.issues.github;



public class GitHubIssuesParsingTest extends IssuesParsingContract {
    public GitHubIssuesParsingTest() {
        super(GitHubIssues.issueIsOpen);