@Test public void getConvertibleTypes() { final Set<ConvertiblePair> convertibleTypes = converter.getConvertibleTypes(); Assert.assertEquals(1, convertibleTypes.size()); final ConvertiblePair convertiblePair = convertibleTypes.iterator().next(); Assert.assertSame(Object.class, convertiblePair.getSourceType()); Assert.assertSame(Object.class, convertiblePair.getTargetType()); }
@Test public void convert() { beanMapper.map("METHOD", ElementType.class); EasyMock.expectLastCall().andReturn(ElementType.METHOD); EasyMock.replay(beanMapper); Assert.assertEquals( ElementType.METHOD, converter.convert("METHOD", null, TypeDescriptor.valueOf(ElementType.class))); EasyMock.verify(beanMapper); }
@Test public void convertNull() { Assert.assertNull(converter.convert(null, null, null)); }