ProvidenceHelper { @Nonnull public static <Message extends PMessage<Message, Field>, Field extends PField> ArrayList<Message> arrayListFromJsonResource(String path, PMessageDescriptor<Message, Field> descriptor) throws IOException { return arrayListFromResource(path, descriptor, new JsonSerializer(true)); } private  ProvidenceHelper(); @SuppressWarnings("unchecked") static B getTargetModifications(M source, M target); @Nonnull static Message fromJsonResource(String path,
                             PMessageDescriptor<Message, Field> descriptor); @Nonnull static ArrayList<Message> arrayListFromJsonResource(String path,
                                                 PMessageDescriptor<Message, Field> descriptor); @Nonnull static Message fromResource(String resource,
                         PMessageDescriptor<Message, Field> descriptor,
                         Serializer serializer); @Nonnull static ArrayList<Message> arrayListFromResource(String path,
                                             PMessageDescriptor<Message, Field> descriptor,
                                             Serializer serializer); @Nonnull static String debugString(Message message); @Nonnull static Message parseDebugString(String string, PMessageDescriptor<Message, Field> descriptor); @SuppressWarnings("unchecked") @Nonnull static Optional<T> optionalInMessage(PMessage message, PField... fields);  }
@Test public void testArrayListFromJsonResource() throws IOException { List<Containers> pretty = net.morimekta.providence.util.ProvidenceHelper.arrayListFromJsonResource("/compat/pretty.json", Containers.kDescriptor); List<Containers> compact = net.morimekta.providence.util.ProvidenceHelper.arrayListFromJsonResource("/compat/compact.json", Containers.kDescriptor); assertEquals(10, pretty.size()); assertEquals(pretty.size(), compact.size()); for (int i = 0; i < 10; ++i) { assertEquals(debugString(compact.get(i)), debugString(pretty.get(i))); } }