// Path: integration-test-java/src/test/java/verification/Utils.java
// public final class Utils {
// 
//     private Utils() {
//     }
// 
//     private static <T> TypeAdapter<T> getTypeAdapter(@NotNull Class<T> clazz) {
//         Gson gson = new Gson();
//         Stag.Factory factory = new Stag.Factory();
//         TypeToken<T> innerModelType = TypeToken.get(clazz);
//         return factory.create(gson, innerModelType);
//     }
// 
//     /**
//      * Verifies that a TypeAdapter was generated for the specified class.
//      *
//      * @param clazz the class to check.
//      * @param <T>   the type of the class, used internally.
//      */
//     public static <T> void verifyTypeAdapterGeneration(@NotNull Class<T> clazz) {
//         TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         assertNotNull("Type adapter should have been generated by Stag", typeAdapter);
//     }
// 
//     /**
//      * Verifies that a TypeAdapter was NOT generated for the specified class.
//      *
//      * @param clazz the class to check.
//      * @param <T>   the type of the class, used internally.
//      */
//     public static <T> void verifyNoTypeAdapterGeneration(@NotNull Class<T> clazz) {
//         TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         assertNull("Type adapter should not have been generated by Stag", typeAdapter);
//     }
// 
//     /**
//      * Verifies that the type adapter for a class is correct. It does this by manufacturing an
//      * instance of the class, writing it to JSON, and then reading that object back out of JSON
//      * and comparing the two instances.
//      *
//      * @param clazz the {@link Class} to use to get the {@link TypeAdapter}.
//      */
//     public static <T> void verifyTypeAdapterCorrectness(@NotNull Class<T> clazz) {
//         final PodamFactory factory = new PodamFactoryImpl();
//         factory.setClassStrategy(new HungarianNotationClassInfoStrategy());
// 
//         final T object = factory.manufacturePojo(clazz);
//         final TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         
//         T newObject = null;
//         if (typeAdapter != null) {
//             final String json = typeAdapter.toJson(object);
//             try {
//                 newObject = typeAdapter.fromJson(json);
//             } catch (IOException ignored) {}
//         }
// 
//         assertEquals(object, newObject);
//     }
// 
// }


import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import java.io.IOException;
import verification.Utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.vimeo.sample_java_model.SwappableParserExampleModel.TestObject;
import com.vimeo.sample_java_model.stag.generated.Stag;
/*
 * The MIT License (MIT)
 * <p/>
 * Copyright (c) 2017 Vimeo
 * <p/>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * <p/>
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * <p/>
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.vimeo.sample_java_model;






/**
 * Unit tests for {@link SwappableParserExampleModel}.
 */
public class SwappableParserExampleModelTest {

    @Test
    public void verifyTypeAdapterWasGenerated_SwappableParserExampleModel() throws Exception {
// Path: integration-test-java/src/test/java/verification/Utils.java
// public final class Utils {
// 
//     private Utils() {
//     }
// 
//     private static <T> TypeAdapter<T> getTypeAdapter(@NotNull Class<T> clazz) {
//         Gson gson = new Gson();
//         Stag.Factory factory = new Stag.Factory();
//         TypeToken<T> innerModelType = TypeToken.get(clazz);
//         return factory.create(gson, innerModelType);
//     }
// 
//     /**
//      * Verifies that a TypeAdapter was generated for the specified class.
//      *
//      * @param clazz the class to check.
//      * @param <T>   the type of the class, used internally.
//      */
//     public static <T> void verifyTypeAdapterGeneration(@NotNull Class<T> clazz) {
//         TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         assertNotNull("Type adapter should have been generated by Stag", typeAdapter);
//     }
// 
//     /**
//      * Verifies that a TypeAdapter was NOT generated for the specified class.
//      *
//      * @param clazz the class to check.
//      * @param <T>   the type of the class, used internally.
//      */
//     public static <T> void verifyNoTypeAdapterGeneration(@NotNull Class<T> clazz) {
//         TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         assertNull("Type adapter should not have been generated by Stag", typeAdapter);
//     }
// 
//     /**
//      * Verifies that the type adapter for a class is correct. It does this by manufacturing an
//      * instance of the class, writing it to JSON, and then reading that object back out of JSON
//      * and comparing the two instances.
//      *
//      * @param clazz the {@link Class} to use to get the {@link TypeAdapter}.
//      */
//     public static <T> void verifyTypeAdapterCorrectness(@NotNull Class<T> clazz) {
//         final PodamFactory factory = new PodamFactoryImpl();
//         factory.setClassStrategy(new HungarianNotationClassInfoStrategy());
// 
//         final T object = factory.manufacturePojo(clazz);
//         final TypeAdapter<T> typeAdapter = getTypeAdapter(clazz);
//         
//         T newObject = null;
//         if (typeAdapter != null) {
//             final String json = typeAdapter.toJson(object);
//             try {
//                 newObject = typeAdapter.fromJson(json);
//             } catch (IOException ignored) {}
//         }
// 
//         assertEquals(object, newObject);
//     }
// 
// }


// Path: integration-test-java/src/test/java/com/vimeo/sample_java_model/SwappableParserExampleModelTest.java
import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import java.io.IOException;
import verification.Utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.vimeo.sample_java_model.SwappableParserExampleModel.TestObject;
import com.vimeo.sample_java_model.stag.generated.Stag;

/*
 * The MIT License (MIT)
 * <p/>
 * Copyright (c) 2017 Vimeo
 * <p/>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * <p/>
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * <p/>
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.vimeo.sample_java_model;






/**
 * Unit tests for {@link SwappableParserExampleModel}.
 */
public class SwappableParserExampleModelTest {

    @Test
    public void verifyTypeAdapterWasGenerated_SwappableParserExampleModel() throws Exception {
        Utils.verifyTypeAdapterGeneration(SwappableParserExampleModel.class);