Both persistence configs have unnamed beans, so they fight for precendence. Foo wins, so the BarRepositoryTest crashes against the error: Not an managed type: class com.sctrcd.multidsdemo.domain.bar.Bar
Name the beans, so now we see: No bean named 'transactionManager' is defined.