Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Strange behavior with multiple Injectables of the same type #400
JMockit version: 1.30
The following code demonstrates the behavior. As it is written, the test will fail with a missing invocation as expected, and "real" is printed to the console. But if the two commented lines are uncommented, the test passes and "mock" is printed to the console. Is this the expected behavior when two Injectables of the same type are within the scope of the test? I've found that it doesn't matter the type of the Injectables either; File, HashMap, and Bar have all produced this behavior.