Using the response output in the Discovery API documentation to create the json files for the different classes for testing Discovery with mock output. So far so good until I came upon the create configuration class.
When trying to loadFixture for this class I get the following exception.
create_conf_resp = loadFixture(RESOURCE + "create_conf_resp.json", CreateConfigurationResponse.class);
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 892 path $.conversions.word.heading.styles
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:216)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:216)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:216)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:216)
at com.google.gson.Gson.fromJson(Gson.java:879)
at com.google.gson.Gson.fromJson(Gson.java:844)
at com.google.gson.Gson.fromJson(Gson.java:793)
at com.google.gson.Gson.fromJson(Gson.java:765)
at com.ibm.watson.developer_cloud.WatsonServiceTest.loadFixture(WatsonServiceTest.java:200)
at com.ibm.watson.developer_cloud.discovery.v1.DiscoveryServiceTest.setup(DiscoveryServiceTest.java:155) ...
Using the response output in the Discovery API documentation to create the json files for the different classes for testing Discovery with mock output. So far so good until I came upon the create configuration class.
When trying to loadFixture for this class I get the following exception.