Double value = field.clean(new String[]{""}, errors);
assertTrue(errors.isEmpty());
}
public void testInvalid() throws Exception {
PercentField field = injector.getInstance(PercentField.class);
field.setName("fieldName");
Map<String, String> errors = new HashMap<String, String>();
Double value = field.clean(new String[]{"qwert"}, errors);
assertFalse(errors.isEmpty());
assertTrue(errors.containsKey("fieldName"));
assertEquals(PercentField.ERROR_NUMBER_NOT_VALID, errors.get("fieldName"));
}