commands
commands copied to clipboard
Unit testing class with CommandManager as a member? (NoClassDefFoundError)
I'm trying to unit test a class that wraps a CommandManager. I can't inject a mock CommandManager object into the object I'm testing as CommandManager#log()
uses LogLevel which is package private, so I can't implement it. Also, PaperCommandManager throws java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap
at runtime, so I can't just mock the objects it uses.
Any help would be much appreciated. I think this could be resolved by making LogLevel protected or public. Thanks for the amazing library, helped me more than you could imagine.