@Test public void test_unsupported() { try { factory.build(-1); fail(); } catch (UnsupportedOperationException err) { assertEquals("Unsupported form field type", err.getMessage()); } }
@Test public void test() { assertTrue(factory.build(AcroFields.FIELD_TYPE_TEXT) instanceof TextField); assertTrue(factory.build(AcroFields.FIELD_TYPE_CHECKBOX) instanceof CheckboxField); }