@Test @SuppressWarnings("unchecked") public void testCallSuccessCallback() { BaseRecordConfiguration settings = mock(BaseRecordConfiguration.class); configuration.setSuccessCallback(new SuccessCallback<BaseRecordConfiguration>() { @Override public void call(BaseRecordConfiguration settings) { settings.getSuccessEvent(); } }); configuration.callSuccessCallback(settings); verify(settings).getSuccessEvent(); }
public void callSuccessCallback(T object) { if (successCallback != null) { successCallback.call(object); } }
BaseRecordConfiguration { public void callSuccessCallback(T object) { if (successCallback != null) { successCallback.call(object); } } }
BaseRecordConfiguration { public void callSuccessCallback(T object) { if (successCallback != null) { successCallback.call(object); } } BaseRecordConfiguration();  BaseRecordConfiguration(Type type); }
BaseRecordConfiguration { public void callSuccessCallback(T object) { if (successCallback != null) { successCallback.call(object); } } BaseRecordConfiguration();  BaseRecordConfiguration(Type type); boolean shouldLoadFromCache(); boolean shouldLoadFromNetwork(); Type getType(); void setSuccessEvent(SuccessEvent<T> successEvent); SuccessEvent<T> getSuccessEvent(); void setSuccessCallback(SuccessCallback<T> successCallback); void callSuccessCallback(T object); void setFailureEvent(FailureEvent failureEvent); FailureEvent getFailureEvent(); void setFailureCallback(FailureCallback failureCallback); void callFailureCallback(); long getStartTime(); boolean shouldRunSynchronously(); boolean shouldRunAsynchronously(); void setRunAsynchronously(); void setRunSynchronously(); void performAsynchronousNetworkCall(Object key, Callback callback); Result performSynchronousNetworkCall(Object key); void setAsynchronousNetworkCall(AsyncNetworkCall asyncNetworkCall); void setSynchronousNetworkCall(SynchronousNetworkCall synchronousNetworkCall); abstract void removeCache(); }
BaseRecordConfiguration { public void callSuccessCallback(T object) { if (successCallback != null) { successCallback.call(object); } } BaseRecordConfiguration();  BaseRecordConfiguration(Type type); boolean shouldLoadFromCache(); boolean shouldLoadFromNetwork(); Type getType(); void setSuccessEvent(SuccessEvent<T> successEvent); SuccessEvent<T> getSuccessEvent(); void setSuccessCallback(SuccessCallback<T> successCallback); void callSuccessCallback(T object); void setFailureEvent(FailureEvent failureEvent); FailureEvent getFailureEvent(); void setFailureCallback(FailureCallback failureCallback); void callFailureCallback(); long getStartTime(); boolean shouldRunSynchronously(); boolean shouldRunAsynchronously(); void setRunAsynchronously(); void setRunSynchronously(); void performAsynchronousNetworkCall(Object key, Callback callback); Result performSynchronousNetworkCall(Object key); void setAsynchronousNetworkCall(AsyncNetworkCall asyncNetworkCall); void setSynchronousNetworkCall(SynchronousNetworkCall synchronousNetworkCall); abstract void removeCache();  }