Hi @yeouluen0929
This is already discussed here
Or
you can avoid this by using the org.mockito.Mockito.mockConstruction to simulate the behavior of Document, ProcessInputXML, and TableOfContent
This approach avoids initializing the actual Document object and its dependencies, which may not be av...