use of java.util.concurrent.TransferQueue in project dubbo by alibaba.
the class StringToTransferQueueConverterTest method testConvert.
@Test
public void testConvert() {
TransferQueue values = new LinkedTransferQueue(asList(1, 2, 3));
TransferQueue result = (TransferQueue) converter.convert("1,2,3", List.class, Integer.class);
assertTrue(CollectionUtils.equals(values, result));
values.clear();
values.addAll(asList("123"));
result = (TransferQueue) converter.convert("123", NavigableSet.class, String.class);
assertTrue(CollectionUtils.equals(values, result));
assertNull(converter.convert(null, Collection.class, Integer.class));
assertNull(converter.convert("", Collection.class, null));
}
Aggregations