use of org.jboss.ejb.client.UUIDSessionID in project wildfly by wildfly.
the class KeyMapperTestCase method test.
@Test
public void test() {
TwoWayKey2StringMapper mapper = new KeyMapper();
Assert.assertTrue(mapper.isSupportedType(InfinispanBeanKey.class));
Assert.assertTrue(mapper.isSupportedType(InfinispanBeanGroupKey.class));
Set<String> formatted = new HashSet<>();
SessionID id = new UUIDSessionID(UUID.randomUUID());
BeanKey<SessionID> beanKey = new InfinispanBeanKey<>(id);
String formattedBeanKey = mapper.getStringMapping(beanKey);
Assert.assertEquals(beanKey, mapper.getKeyMapping(formattedBeanKey));
Assert.assertTrue(formatted.add(formattedBeanKey));
BeanGroupKey<SessionID> beanGroupKey = new InfinispanBeanGroupKey<>(id);
String formattedBeanGroupKey = mapper.getStringMapping(beanGroupKey);
Assert.assertEquals(beanGroupKey, mapper.getKeyMapping(formattedBeanGroupKey));
Assert.assertTrue(formatted.add(formattedBeanGroupKey));
}
Aggregations