I have a Bean with a property "DBServer"; It has a default of "location1";
During application startup, Depending on the value of "DBServer", different classes are instantiated.
I have 200 tests where this default setting is fine.
However, As of now,I would like to test the alternative.
Question:
Is there a way to from within a junit test case to reset the default before the application context starts ?
Junit won't start application context unless you write setUp method under @before annotation. In that case you can initialize your bean with any values.