@Test @SuppressWarnings("unchecked") public void testDelete() { final Object object = new Object(); when(modelRecord.setupDeleteConfiguration(any(SingleRecordConfiguration.class), eq(object))).thenReturn(singleRecordConfiguration); doCallRealMethod().when(modelRecord).delete(object); modelRecord.delete(object); verify(modelRecord).setupDeleteConfiguration(any(SingleRecordConfiguration.class), eq(object)); verify(singleRecordConfiguration).performAsynchronousNetworkCall(eq(object), any(DeleteCallback.class)); }
public void delete(T model){ SingleRecordConfiguration configuration = setupDeleteConfiguration(new SingleRecordConfiguration(), model); final DeleteCallback deleteCallback = DeleteCallback.createFromConfiguration(configuration, eventProcessor, httpReport, model); configuration.performAsynchronousNetworkCall(model, deleteCallback); }
ModelRecord { public void delete(T model){ SingleRecordConfiguration configuration = setupDeleteConfiguration(new SingleRecordConfiguration(), model); final DeleteCallback deleteCallback = DeleteCallback.createFromConfiguration(configuration, eventProcessor, httpReport, model); configuration.performAsynchronousNetworkCall(model, deleteCallback); } }
ModelRecord { public void delete(T model){ SingleRecordConfiguration configuration = setupDeleteConfiguration(new SingleRecordConfiguration(), model); final DeleteCallback deleteCallback = DeleteCallback.createFromConfiguration(configuration, eventProcessor, httpReport, model); configuration.performAsynchronousNetworkCall(model, deleteCallback); } ModelRecord(Bus bus);  ModelRecord(Bus bus, HttpReport httpReport);  ModelRecord(EventProcessor eventProcessor);  ModelRecord(EventProcessor eventProcessor, HttpReport httpReport); }
ModelRecord { public void delete(T model){ SingleRecordConfiguration configuration = setupDeleteConfiguration(new SingleRecordConfiguration(), model); final DeleteCallback deleteCallback = DeleteCallback.createFromConfiguration(configuration, eventProcessor, httpReport, model); configuration.performAsynchronousNetworkCall(model, deleteCallback); } ModelRecord(Bus bus);  ModelRecord(Bus bus, HttpReport httpReport);  ModelRecord(EventProcessor eventProcessor);  ModelRecord(EventProcessor eventProcessor, HttpReport httpReport); void create(T model); void update(T model); void delete(T model); void load(); void load(Object key); void refresh(); void refresh(Object key); void getPreLoaded(); void getPreLoaded(Object key); Object loadSynchronously(); Object loadSynchronously(Object key); Object refreshSynchronously(); Object refreshSynchronously(Object key); Object getPreLoadedSynchronously(); Object getPreLoadedSynchronously(Object key); void loadList(); void loadList(Object key); void refreshList(); void refreshList(Object key); void getPreLoadedList(); void getPreLoadedList(Object key); List loadListSynchronously(); List loadListSynchronously(Object key); List refreshListSynchronously(); List refreshListSynchronously(Object key); List getPreLoadedListSynchronously(); List getPreLoadedListSynchronously(Object key); }
ModelRecord { public void delete(T model){ SingleRecordConfiguration configuration = setupDeleteConfiguration(new SingleRecordConfiguration(), model); final DeleteCallback deleteCallback = DeleteCallback.createFromConfiguration(configuration, eventProcessor, httpReport, model); configuration.performAsynchronousNetworkCall(model, deleteCallback); } ModelRecord(Bus bus);  ModelRecord(Bus bus, HttpReport httpReport);  ModelRecord(EventProcessor eventProcessor);  ModelRecord(EventProcessor eventProcessor, HttpReport httpReport); void create(T model); void update(T model); void delete(T model); void load(); void load(Object key); void refresh(); void refresh(Object key); void getPreLoaded(); void getPreLoaded(Object key); Object loadSynchronously(); Object loadSynchronously(Object key); Object refreshSynchronously(); Object refreshSynchronously(Object key); Object getPreLoadedSynchronously(); Object getPreLoadedSynchronously(Object key); void loadList(); void loadList(Object key); void refreshList(); void refreshList(Object key); void getPreLoadedList(); void getPreLoadedList(Object key); List loadListSynchronously(); List loadListSynchronously(Object key); List refreshListSynchronously(); List refreshListSynchronously(Object key); List getPreLoadedListSynchronously(); List getPreLoadedListSynchronously(Object key);  }