@@ -0,0 +1,1531 @@
+package com.ibm.mil.cafejava;%0A%0Aimport com.worklight.wlclient.api.WLResponse;%0A%0Aimport org.json.JSONObject;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0A%0Aimport rx.Observable;%0Aimport rx.observers.TestSubscriber;%0A%0Aimport static junit.framework.Assert.assertEquals;%0Aimport static junit.framework.Assert.assertTrue;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class JacksonConverterTest %7B%0A    private Observable%3CWLResponse%3E observable;%0A%0A    @Before public void before() %7B%0A        Person person = new Person();%0A        person.setName(%22John%22);%0A        person.setAge(25);%0A        person.setDev(true);%0A%0A        JSONObject jsonObject = mock(JSONObject.class);%0A        when(jsonObject.toString()).thenReturn(person.toString());%0A%0A        WLResponse wlResponse = mock(WLResponse.class);%0A        when(wlResponse.getResponseJSON()).thenReturn(jsonObject);%0A%0A        observable = Observable.just(wlResponse);%0A    %7D%0A%0A    @Test public void testSimpleObject() %7B%0A        TestSubscriber%3CPerson%3E subscriber = new TestSubscriber%3C%3E();%0A        observable.lift(new JacksonObjectConverter%3C%3E(Person.class)).subscribe(subscriber);%0A%0A        subscriber.assertNoErrors();%0A        subscriber.assertTerminalEvent();%0A%0A        List%3CPerson%3E persons = subscriber.getOnNextEvents();%0A        assertEquals(1, persons.size());%0A%0A        Person person = persons.get(0);%0A        assertEquals(%22John%22, person.getName());%0A        assertEquals(25, person.getAge());%0A        assertTrue(person.isDev());%0A    %7D%0A%7D%0A

Write simple JacksonConverter test for object mapping