### Question:
Sku { @Nonnull static Sku fromJson(@Nonnull String json, @Nonnull String product) throws JSONException { return new Sku(json, product); } Sku(@Nonnull String product,
               @Nonnull String code,
               @Nonnull String price,
               @Nonnull Price detailedPrice,
               @Nonnull String title,
               @Nonnull String description,
               @Nonnull String introductoryPrice,
               @Nonnull Price detailedIntroductoryPrice,
               @Nonnull String subscriptionPeriod,
               @Nonnull String freeTrialPeriod,
               @Nonnull String introductoryPricePeriod,
               int introductoryPriceCycles);   Sku(@Nonnull String json, @Nonnull String product); @Nonnull String toJson(); @Override String toString(); @Nonnull String getDisplayTitle(); @Override boolean equals(Object o); @Override int hashCode(); boolean isInApp(); boolean isSubscription(); @Nonnull
    final Id id; @Nonnull
    final String price; @Nonnull
    final Price detailedPrice; @Nonnull
    final String title; @Nonnull
    final String description; @Nonnull
    final String subscriptionPeriod; @Nonnull
    final String introductoryPrice; @Nonnull
    final Price detailedIntroductoryPrice; @Nonnull
    final String freeTrialPeriod; @Nonnull
    final String introductoryPricePeriod; final int introductoryPriceCycles; }### Answer:
@Test public void testInAppSkuShouldBeCreatedFromJson() throws Exception { final Sku sku = Sku.fromJson(newInAppJson("1"), ProductTypes.IN_APP); verifySku(sku, "1"); }
@Test public void testSubscriptionSkuShouldBeCreatedFromJson() throws Exception { final Sku sku = Sku.fromJson(newSubscriptionJson("1"), ProductTypes.SUBSCRIPTION); verifySku(sku, "1"); }
@Test public void testShouldHaveNotValidPriceIfNoDetailedDataAvailable() throws Exception { final Sku sku = Sku.fromJson(newInAppJson("1"), "test"); assertFalse(sku.detailedPrice.isValid()); }
@Test public void testShouldHaveNotValidIntroductoryPriceIfNoDetailedDataAvailable() throws Exception { final Sku sku = Sku.fromJson(newSubscriptionJson("1"), "test"); assertNotNull(sku.detailedIntroductoryPrice); assertFalse(sku.detailedIntroductoryPrice.isValid()); }