### Question:
ConverterFactory { public Converter<?> createConverter(String className) { if (isClass(String.class, className)) { return new StringConverter(); } else if (isClass(Date.class, className)) { return new DateConverter(); } else if (isClass(Double.class, className)) { return new DoubleConverter(); } else if (isClass(Long.class, className)) { return new LongConverter(); } else if (isClass(Boolean.class, className)) { return new BooleanConverter(); } else if (isClass(Integer.class, className)) { return new IntegerConverter(); } throw new UnsupportedOperationException("Canno't create converter for class name : " + className); }  Converter<?> createConverter(String className);  }### Answer:
@Test public void factoryCreateABooleanConverterForBooleanClassName() throws Exception { Converter<?> createConverter = factory.createConverter(Boolean.class.getName()); assertTrue(createConverter instanceof BooleanConverter); }
@Test @Ignore("until ENGINE-1099 is resolved") public void factoryCreateADateConverterForDateClassName() throws Exception { Converter<?> createConverter = factory.createConverter(Date.class.getName()); assertTrue(createConverter instanceof DateConverter); }
@Test public void factoryCreateADoubleConverterForDoubleClassName() throws Exception { Converter<?> createConverter = factory.createConverter(Double.class.getName()); assertTrue(createConverter instanceof DoubleConverter); }
@Test public void factoryCreateALongConverterForLongClassName() throws Exception { Converter<?> createConverter = factory.createConverter(Long.class.getName()); assertTrue(createConverter instanceof LongConverter); }
@Test public void factoryCreateAStringConverterForStringClassName() throws Exception { Converter<?> createConverter = factory.createConverter(String.class.getName()); assertTrue(createConverter instanceof StringConverter); }
@Test public void factoryCreateAnIntegerConverterForIntegerClassName() throws Exception { Converter<?> createConverter = factory.createConverter(Integer.class.getName()); assertTrue(createConverter instanceof IntegerConverter); }
@Test(expected = UnsupportedOperationException.class) public void factoryThrowExceptionForUnsuportedConverter() throws Exception { factory.createConverter(Servlet.class.getName()); }