ItemFactory implements IItemFactory { @Override public Item createNewSimpleItem(final String name, final String alias, final String description, final String required, final String type, final String format) throws APIRestGeneratorException { Item item = this.createNewSimpleItemG1(name, alias, description, required, type, format) ; if (item == null) { item = this.createNewSimpleItemG2(name, alias, description, required, type, format) ; } return item ; } ItemFactory(final Map<String, Item> mainItemsMap); @Override boolean isSimpleItem(final String type); @Override Item createNewSimpleItem(final String name,
									final String alias,
						   	  		final String description,
						   	  		final String required,
						   	  		final String type,
						   	  		final String format); @Override boolean isArrayItem(final String type); @Override ItemArray createNewArray(final String name, final String alias, final String description, final String required); @Override ItemRef createNewItemRef(final String name,
    								final String alias,
    								final String description,
    								final String required,
    								final String reference); @Override boolean isComplexItem(final String type); @Override ItemComplex createNewItemComplex(final String name, final String alias, final String description, final String required); @Override boolean isFileItem(final String type); @Override ItemFile createNewItemFile(final String name, final String alias, final String description, final String required);  }
@Test(expected = APIRestGeneratorException.class) public void invalidType() throws APIRestGeneratorException { final ItemFactory itemFactory = ItemFactoryTest.generateDummyItemFactory() ; itemFactory.createNewSimpleItem(ConstantsTest.ITEM_NAME, ConstantsTest.ALIAS, ConstantsTest.DESCRIPTION, ConstantsTest.REQUIRED, "invalidType", "invalidFormat") ; }