public void writeReadSimpleList() throws SecurityException, NoSuchFieldException
{
// create dummy translator that always returns a single property containing the instance
PropertyTranslator chained = new DirectTranslator();
ListTranslator translator = new ListTranslator(chained);
Set<Property> encoded = translator.typesafeToProperties(values, Path.EMPTY_PATH, true);
// should be a single property with a list of values
assertEquals(1, encoded.size());
Field field = getClass().getDeclaredField("values");
@SuppressWarnings("unchecked")
List<String> decoded = (List<String>) translator.propertiesToTypesafe(encoded, Path.EMPTY_PATH, field.getGenericType());
assertEquals("is", decoded.get(1));
assertEquals(3, decoded.size());
}