@@ -0,0 +1,686 @@
+package com.stripe.model;%0A%0Aimport com.stripe.BaseStripeTest;%0Aimport com.stripe.model.Event;%0A%0Aimport java.io.IOException;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class EventTest extends BaseStripeTest %7B%0A%09@Test%0A%09public void nestedObjectDeserializesToModel() throws IOException %7B%0A%09%09String json = resource(%22account_event.json%22);%0A%09%09Event event = StripeObject.PRETTY_PRINT_GSON.fromJson(json, Event.class);%0A%0A%09%09// Thanks to some GSON magic, the object nested within the event can be%0A%09%09// typecast to its expected type.%0A%09%09Account account = (com.stripe.model.Account)event.getData().getObject();%0A%0A%09%09assertEquals(account.getEmail(), %22test@stripe.com%22);%0A%09%7D%0A%7D%0A

Add test to demonstrate event deserialization