### Question:
InstantiatorImpl implements Instantiator<T> { @SuppressWarnings("unchecked") public List<String> fromInstance(T instance) { List<String> parameters = Lists.newArrayListWithCapacity(fields.length); for (int i = 0; i < fields.length; i++) { try { Field field = fields[i]; String parameterAsString; if (field != null) { Object value = field.get(instance); if (wrapInOption.get(i)) { value = ((Option<Object>) value).getOrElse((Object) null); } parameterAsString = value == null ? null : converters[i].toString(value); } else { parameterAsString = null; } parameters.add(parameterAsString); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } return parameters; } InstantiatorImpl(
      Constructor<T> constructor,
      Converter<?>[] converters,
      Field[] fields,
      BitSet optionality,
      BitSet wrapInOption,
      String[] defaultValues,
      Object[] defaultConstants,
      String[] parameterNames); @Override T newInstance(String... values); @Override T newInstance(Map<String, String> namedValues); @Override T newInstance(Iterable<String> values); @SuppressWarnings("unchecked") List<String> fromInstance(T instance); @Override Constructor<T> getConstructor(); @Override String toString();  }### Answer:
@Test public void fromInstanceSimple() { assertEquals( newArrayList("56"), createFactory(new Errors(), Simple.class).build().getOrThrow() .fromInstance(new Simple(56))); }
@Test public void fromInstanceHasEnum() { assertEquals( newArrayList("FOO"), createFactory(new Errors(), HasEnum.class).build().getOrThrow() .fromInstance(new HasEnum(IsEnum.FOO))); }
@Test public void fromInstanceNatives() { List<String> parameters = createFactory(new Errors(), Natives.class).build().getOrThrow() .fromInstance(new Natives(2, 3.4, (short) 5, '6', 7l, true, 8.0f, (byte) 9)); assertEquals( newArrayList( "2", "3.4", "5", "6", "7", "true", "8.0", "9"), parameters); }