MessageToClientManager { IDataServiceResolver getResolver(String type) { return resolvers.select(new DataServiceResolverIdLitteral(type)).get(); }  abstract Map<String, Object> getSessionBeans(T session); MessageToClient createMessageToClient(MessageFromClient message, T session);  }
@Test public void testGetResolver() { Instance<IDataServiceResolver> inst = mock(Instance.class); when(resolvers.select(eq(new DataServiceResolverIdLitteral("cdi")))).thenReturn(inst); when(inst.get()).thenReturn(new CdiResolver()); IDataServiceResolver result = instance.getResolver("cdi"); assertThat(result).isInstanceOf(CdiResolver.class); }