Loading

Tag Archives: inject

JUnit and Netbeans. Injecting in objects in the default Lookup

If you need to unit test classes in a netbeans module and the classes use the Lookup.getDefault() to “lookup” things that you want to mock you probably wonder how you can place the mock objects in the default Lookup Adding objects to the Netbeans’s default Lookup is relatively simple. Here is the answer: Replace the [...]