I have a junit test class in which I have to specify the new persistent unit name suppose say "B" with properties connecting to the DB. From this test class I am invoking a JPA REST service which in turn calls a business logic java class. In this business logic class, I have written entitymanager with the persistent xml unit suppose say "A".
Question here is how can I specify the persistent unit B in junit test class so that the business class uses persistent unit B instead of A?