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));
        }


    }
public void testDataSet ( final TestDataSetCallback testDataSetCallback ) { checkDataSetDefNotNull ( ) ; 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 ) ) ; } }
<p>Test the data set connection and obtain the preview result.</p>