field.setAccessible(true);
DataContainer dataContainer = (DataContainer) field.get(dataSource);
// Add a new Photo where the "Type" property is set to, space-separated,
// a literal percent character, all gen-delims, and all sub-delims
// as specified by RFC 3986.
dataContainer.getPhotos().add(new Photo(42, "strange Photo", "% :/?#[]@ !$&'()*+,;="));
// Check that percent-decoding and -encoding works as expected.
final String url =
"Container2.Photos(Id=42,Type='%25%20%3A%2F%3F%23%5B%5D%40%20%21%24%26%27%28%29%2A%2B%2C%3B%3D')";
final String expected = url.replace("%27", "''");