{"task": {"agent_timeout": 3000, "task": "testgen__fasterxml__jackson-databind-3851", "verifier_timeout": 3000, "instruction": "The following text contains a user issue (in <issue/> brackets) posted at a repository. Further, you are provided with file contents of several files in the repository that contain relevant code (in <code> brackets). It may be necessary to use code from third party dependencies or files not contained in the attached documents however. Your task is to identify the issue and implement a test case that verifies a proposed solution to this issue. More details at the end of this text.\n<issue>\n      **Describe the bug**\nWhen Enum has two factory methods, one with `JsonCreator.Mode.DELEGATING` and the other with `JsonCreator.Mode.PROPERTIES`, only the latter works. Deserialization that is supposed to target the DELEGATING one fails with `com.fasterxml.jackson.databind.exc.MismatchedInputException`.\nNote that the same setup for a POJO works just fine.\n\n**Version information**\n2.13.3\n\n**To Reproduce**\n```java\nclass TestCases {\n    @Test\n    void testClass() throws JsonProcessingException {\n        ObjectMapper objectMapper = new ObjectMapper();\n        Assertions.assertEquals(new AClass(\"someName\"), objectMapper.readValue(\"{ \\\"name\\\": \\\"someName\\\" }\", AClass.class));\n        Assertions.assertEquals(new AClass(\"someName\"), objectMapper.readValue(\"\\\"someName\\\"\", AClass.class));\n    }\n\n    @Test\n    void testEnum() throws JsonProcessingException {\n        ObjectMapper objectMapper = new ObjectMapper();\n        Assertions.assertEquals(AEnum.A, objectMapper.readValue(\"{ \\\"type\\\": \\\"AType\\\" }\", AEnum.class));\n        Assertions.assertEquals(AEnum.A, objectMapper.readValue(\"\\\"AType\\\"\", AEnum.class)); // this line fails\n    }\n}\n\nclass AClass {\n    private final String name;\n\n    AClass(String name) {\n        this.name = name;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    @JsonCreator(mode = JsonCreator.Mode.DELEGATING)\n    public static AClass fromString(String name) {\n        return new AClass(name);\n    }\n\n    @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)\n    public static AClass create(@JsonProperty(\"name\") String name) {\n        return new AClass(name);\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (o == null || getClass() != o.getClass()) return false;\n        AClass aClass = (AClass) o;\n        return Objects.equals(name, aClass.name);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name);\n    }\n}\n\n@JsonFormat(shape = JsonFormat.Shape.OBJECT)\nenum AEnum {\n    A(\"AType\"),\n    B(\"BType\");\n\n    private final String type;\n\n    AEnum(String type) {\n        this.type = type;\n    }\n\n    public String getType() {\n        return type;\n    }\n\n    @JsonCreator(mode = JsonCreator.Mode.DELEGATING)\n    public static AEnum fromString(String type) {\n        return Arrays.stream(values())\n                .filter(aEnum -> aEnum.type.equals(type))\n                .findFirst()\n                .orElseThrow();\n    }\n\n    @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)\n    public static AEnum create(@JsonProperty(\"type\") String type) {\n        return fromString(type);\n    }\n}\n```\n\nThe `testClass` passes, but `testEnum` fails with\n```\ncom.fasterxml.jackson.databind.exc.MismatchedInputException: Input mismatch reading Enum `AEnum`: properties-based `@JsonCreator` ([method AEnum#fromString(java.lang.String)]) expects JSON Object (JsonToken.START_OBJECT), got JsonToken.VALUE_STRING\n```\n\nAlso, you can remove the PROPERTIES factory method, and the DELEGATING method would work.\n\n</issue>\nPlease generate test cases that check whether an implemented solution resolves the issue of the user (at the top, within <issue/> brackets).\nYou may apply changes to several files.\nApply as much reasoning as you please and see necessary.\nMake sure to implement only test cases and don't try to fix the issue itself.\nYou are not allowed to read git history.\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "test-generation", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "devopsgym", "tags": ["test-generation", "devops-bench"]}, "runs": []}