@Test
    public void testHandlingDefinition_ExistentNode() {
        ResolvedType javaType = Mockito.mock(ResolvedType.class);
        ObjectNode definitionInput = Mockito.mock(ObjectNode.class);
        SchemaGenerationContextImpl returnValue = this.contextImpl.putDefinition(javaType, definitionInput, null);

        Assertions.assertSame(this.contextImpl, returnValue);
        Assertions.assertTrue(this.contextImpl.containsDefinition(javaType, null));
        DefinitionKey key = new DefinitionKey(javaType, null);
        Assertions.assertSame(definitionInput, this.contextImpl.getDefinition(key));
        Assertions.assertEquals(Collections.singleton(key), this.contextImpl.getDefinedTypes());
    }
Test for the {@link SchemaGenerationContextImpl} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImplTest.java