### Question:
Purchase { @Override public String toString() { return "Purchase(type:" + mItemType + "):" + mOriginalJson; } Purchase(ItemType itemType, String jsonPurchaseInfo, String signature); ItemType getItemType(); String getOrderId(); String getPackageName(); String getSku(); long getPurchaseTime(); int getRawState(); State getState(); String getDeveloperPayload(); String getToken(); String getOriginalJson(); String getSignature(); @Override String toString();  }### Answer:
@Test public void shouldHaveToString() throws Exception { String purchase = resourceAsString("purchase.json"); Purchase p = new Purchase(INAPP, purchase, "signature"); assertThat(p.toString()).startsWith("Purchase(type:inapp)"); }