### Question:
Purchase { @Nonnull static Purchase fromJson(@Nonnull String data, @Nonnull String signature) throws JSONException { return new Purchase(data, signature); } Purchase(@Nonnull String sku, @Nonnull String orderId, @Nonnull String packageName, long time, int state, @Nonnull String payload, @Nonnull String token, boolean autoRenewing, @Nonnull String data, @Nonnull String signature);   Purchase(@Nonnull String data, @Nonnull String signature); @Nonnull String toJson(); @Nonnull String toJson(boolean withSignature); @Override String toString(); @Nonnull
    final String sku; @Nonnull
    final String orderId; @Nonnull
    final String packageName; final long time; @Nonnull
    final State state; @Nonnull
    final String payload; @Nonnull
    final String token; final boolean autoRenewing; @Nonnull
    final String data; @Nonnull
    final String signature; }### Answer:
@Test public void testShouldBeCreatedFromJson() throws Exception { final Purchase purchase = Purchase.fromJson(newJson(2, Purchase.State.REFUNDED), "signature"); verifyPurchase(purchase, 2, Purchase.State.REFUNDED); }