AMBlogsItemSelectorViewReturnTypeProvider implements ItemSelectorViewReturnTypeProvider { @Override public List<ItemSelectorReturnType> populateSupportedItemSelectorReturnTypes( List<ItemSelectorReturnType> supportedItemSelectorReturnTypes) { supportedItemSelectorReturnTypes.add( new AMImageFileEntryItemSelectorReturnType()); supportedItemSelectorReturnTypes.add( new AMImageURLItemSelectorReturnType()); return supportedItemSelectorReturnTypes; }  @Override List<ItemSelectorReturnType> populateSupportedItemSelectorReturnTypes(
			List<ItemSelectorReturnType> supportedItemSelectorReturnTypes);  }
@Test public void testAddAMImageURLItemSelectorReturnTypeWithEmptyList() throws Exception { ItemSelectorViewReturnTypeProvider amBlogsItemSelectorViewReturnTypeProvider = new AMBlogsItemSelectorViewReturnTypeProvider(); List<ItemSelectorReturnType> supportedItemSelectorReturnTypes = new ArrayList<>(); List<ItemSelectorReturnType> itemSelectorReturnTypes = amBlogsItemSelectorViewReturnTypeProvider. populateSupportedItemSelectorReturnTypes( supportedItemSelectorReturnTypes); Assert.assertEquals( itemSelectorReturnTypes.toString(), 2, itemSelectorReturnTypes.size()); Assert.assertTrue( itemSelectorReturnTypes.get(0) instanceof AMImageFileEntryItemSelectorReturnType); Assert.assertTrue( itemSelectorReturnTypes.get(1) instanceof AMImageURLItemSelectorReturnType); }
@Test public void testAddAMImageURLItemSelectorReturnTypeWithNonemptyList() throws Exception { ItemSelectorViewReturnTypeProvider amBlogsItemSelectorViewReturnTypeProvider = new AMBlogsItemSelectorViewReturnTypeProvider(); List<ItemSelectorReturnType> supportedItemSelectorReturnTypes = new ArrayList<>(); supportedItemSelectorReturnTypes.add( new FileEntryItemSelectorReturnType()); supportedItemSelectorReturnTypes.add(new URLItemSelectorReturnType()); List<ItemSelectorReturnType> itemSelectorReturnTypes = amBlogsItemSelectorViewReturnTypeProvider. populateSupportedItemSelectorReturnTypes( supportedItemSelectorReturnTypes); Assert.assertEquals( itemSelectorReturnTypes.toString(), 4, itemSelectorReturnTypes.size()); Assert.assertTrue( itemSelectorReturnTypes.get(0) instanceof FileEntryItemSelectorReturnType); Assert.assertTrue( itemSelectorReturnTypes.get(1) instanceof URLItemSelectorReturnType); Assert.assertTrue( itemSelectorReturnTypes.get(2) instanceof AMImageFileEntryItemSelectorReturnType); Assert.assertTrue( itemSelectorReturnTypes.get(3) instanceof AMImageURLItemSelectorReturnType); }