class DataSetEditorWorkflow implements IsWidget {

    public void testDataSet(final TestDataSetCallback testDataSetCallback) {
        checkDataSetDefNotNull();

        // Reset columns and filter configuration.
        getDataSetDef().setAllColumnsEnabled(true);
        getDataSetDef().setColumns(null);
        getDataSetDef().setDataSetFilter(null);

        DataSetDef editCloneWithoutCacheSettings = getDataSetDef().clone();
        editCloneWithoutCacheSettings.setCacheEnabled(false);

        final DataSetLookup lookup = DataSetFactory.newDataSetLookupBuilder()
                .dataset(dataSetDef.getUUID())
                .rowOffset(0)
                .rowNumber(6)
                .buildLookup();

        try {
            DataSetHandler editHandler = new DataSetEditHandler(clientServices, lookup, editCloneWithoutCacheSettings);
            editHandler.lookupDataSet(new DataSetReadyCallback() {
                @Override
                public void callback(final DataSet dataSet) {
                    testDataSetCallback.onSuccess(dataSet);
                }

                @Override
                public void notFound() {
                    testDataSetCallback.onError(new ClientRuntimeError(DataSetEditorConstants.INSTANCE.defNotFound()));
                }

                @Override
                public boolean onError(final ClientRuntimeError error) {
                    testDataSetCallback.onError(error);
                    return false;
                }
            });
        } catch (final Exception e) {
            testDataSetCallback.onError(new ClientRuntimeError(e));
        }


    }

    @Inject public  DataSetEditorWorkflow(final DataSetClientServices clientServices,
                                 final DataSetValidatorProvider validatorProvider,
                                 final SyncBeanManager beanManager,
                                 final Event<SaveRequestEvent> saveRequestEvent,
                                 final Event<TestDataSetRequestEvent> testDataSetEvent,
                                 final Event<CancelRequestEvent> cancelRequestEvent,
                                 final View view);

}