TSnePoint { public static TSnePoint create(double x, double y, double expressionLevel, String name) { return new AutoValue_TSnePoint(x, y, Optional.of(expressionLevel), name, ""); }  abstract double x(); abstract double y(); abstract Optional<Double> expressionLevel(); abstract String name(); abstract String metadata(); static TSnePoint create(double x, double y, double expressionLevel, String name); static TSnePoint create(double x, double y, String name); static TSnePoint create(double x, double y, String name, String metadata); static GsonTypeAdapter getGsonTypeAdapter();  }
@Test public void toJson() { TSnePoint autoValuedInstance = TSnePoint.create(0.0, 0.0, ""); TSnePoint tSnePointWithoutExpression = TSnePoint.create(0.0, 0.0, "A"); assertThat(GSON.fromJson(GSON.toJson(tSnePointWithoutExpression), autoValuedInstance.getClass())) .isEqualTo(tSnePointWithoutExpression); TSnePoint tSnePointWithExpression = TSnePoint.create(0.0, 0.0, 1.0, "A"); assertThat(GSON.fromJson(GSON.toJson(tSnePointWithExpression), autoValuedInstance.getClass())) .isEqualTo(tSnePointWithExpression); }