JUnit tests: Suppress enum constructor by mocking?
问题 I know that it is possible to mock a single enum(using How to mock an enum singleton class using Mockito/Powermock?), but I have like 1000 of enum values and they can call 5 different constructors. The enum values are often changing in development. I want to really mock only one or two for my JUnit test. I don't care about the rest, but they are still instantiated, which calls some nasty stuff, which loads the values for the enum from the file system. Yes I know It's very bad design. But for