ListEntryTypeValidator.validateField("test", String.class, value); ListEntryTypeValidator.validateField("test", Number.class, value); Assert.fail("Expected Exception not Thrown for value: " + value); } catch (IllegalArgumentException Ex) { for (Object value : testCases2) { try { ListEntryTypeValidator.validateField("test", String.class, value); Assert.fail("Expected Exception not Thrown for value: " + value); } catch (IllegalArgumentException Ex) { ListEntryTypeValidator.validateField("test", Number.class, value); for (Object value : testCases3) { try { ListEntryTypeValidator.validateField("test", String.class, value); Assert.fail("Expected Exception not Thrown for value: " + value); } catch (IllegalArgumentException Ex) { ListEntryTypeValidator.validateField("test", Number.class, value); Assert.fail("Expected Exception not Thrown for value: " + value); } catch (IllegalArgumentException Ex) {
@Override public void validateField(String name, Object o) { validateField(name, this.type, o); }
@Override public void validateField(String name, Object o) { validateField(name, this.type, o); } }