- private ProviderSession createMockContext() {
-
- @SuppressWarnings("deprecation")
- final ClassToInstanceMap<BrokerService> domBrokerServices = ImmutableClassToInstanceMap
- .<BrokerService> builder()
- //
- .put(DOMRpcRouter.class, biBrokerImpl.getRouter()) //
- .put(DOMMountPointService.class, biMountImpl)
- .build();
-
- return new ProviderSession() {
-
- @Override
- public <T extends BrokerService> T getService(final Class<T> service) {
- return domBrokerServices.getInstance(service);
- }
-
- @Override
- public boolean isClosed() {
- return false;
- }
-
- @Override
- public void close() {
- }
- };
- }
-