Overriding is allowed. That's the whole point - your test context just overrides the few beans which need to change for your unit tests. 90% of your context stays the same and you don't have to maintain two separate copies of the same context.

Quote Originally Posted by memelet
No, because I am including the entire production-context.xml into the appcontext along with the integration-context.xml and doing what you showed would be defining two beans of the same id. (Or is allowed to override an existing bean id?)