diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SampleBatchRegistrationMock.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SampleBatchRegistrationMock.java
index 3e59db230d3cf43102ded910be0a2908e4ec8f93..b21c921001f92f1865cff85fb6eb6cdcc80812d3 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SampleBatchRegistrationMock.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SampleBatchRegistrationMock.java
@@ -48,7 +48,8 @@ public class SampleBatchRegistrationMock extends ContentPanel
     {
         setHeading("Sample batch registration mock");
         setBodyBorder(false);
-        sampleTypeSelection = new SampleTypeSelectionWidget(viewContext, true);
+        sampleTypeSelection =
+                new SampleTypeSelectionWidget(viewContext, true, "sample-batch-registration");
         sampleTypeSelection.addSelectionChangedListener(new SelectionChangedListener<ModelData>()
             {
                 @Override
@@ -84,8 +85,7 @@ public class SampleBatchRegistrationMock extends ContentPanel
     static class SampleBatchRegistrationForm extends ContentPanel
     {
 
-        SampleBatchRegistrationForm(final CommonViewContext viewContext,
-                final SampleType sampleType)
+        SampleBatchRegistrationForm(final CommonViewContext viewContext, final SampleType sampleType)
         {
             setStyleAttribute("margin", "30");
             setHeaderVisible(false);
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/GroupSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/GroupSelectionWidget.java
index 05de467e2bdf4e2e8d3d645b9f9cca900691dd16..a5928763f728f16d78ce3ef7cdc9708635167923 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/GroupSelectionWidget.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/GroupSelectionWidget.java
@@ -41,7 +41,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.Group;
  */
 public class GroupSelectionWidget extends ComboBox<GroupModel>
 {
-    final class ListGroupsCallback extends AbstractAsyncCallback<List<Group>>
+    public final class ListGroupsCallback extends AbstractAsyncCallback<List<Group>>
     {
         ListGroupsCallback(final IViewContext<?> viewContext)
         {
@@ -64,7 +64,7 @@ public class GroupSelectionWidget extends ComboBox<GroupModel>
 
     private static final String PREFIX = "group-select";
 
-    static final String ID = GenericConstants.ID_PREFIX + PREFIX;
+    public static final String ID = GenericConstants.ID_PREFIX + PREFIX;
 
     private final IViewContext<ICommonClientServiceAsync> viewContext;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserGrid.java
index 4951d5838230522d55feb410b30d7b7be170a8f9..1879d0e761395c9e9f62f0852ba3e74b9ce0c645 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserGrid.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserGrid.java
@@ -62,13 +62,13 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SampleType;
  * 
  * @author Christian Ribeaud
  */
-final class SampleBrowserGrid extends LayoutContainer
+public final class SampleBrowserGrid extends LayoutContainer
 {
     private static final int PAGE_SIZE = 50;
 
     private static final String PREFIX = "sample-browser-grid_";
 
-    static final String GRID_ID = GenericConstants.ID_PREFIX + PREFIX + "grid";
+    public static final String GRID_ID = GenericConstants.ID_PREFIX + PREFIX + "grid";
 
     private final IViewContext<ICommonClientServiceAsync> viewContext;
 
@@ -274,7 +274,7 @@ final class SampleBrowserGrid extends LayoutContainer
     // Helper classes
     //
 
-    final class ListSamplesCallback extends AbstractAsyncCallback<ResultSet<Sample>>
+    public final class ListSamplesCallback extends AbstractAsyncCallback<ResultSet<Sample>>
     {
         private final AsyncCallback<PagingLoadResult<SampleModel>> delegate;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserToolbar.java
index 40790faa545b3e3bcd3c3d001c78cf0d9f2e9108..59070d0886f0561a9f0f9e5020ff8a0f5bc61456 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserToolbar.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleBrowserToolbar.java
@@ -50,7 +50,9 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SampleType;
  */
 class SampleBrowserToolbar extends ToolBar
 {
-    private static final String PREFIX = "sample-browser-toolbar_";
+    public static final String ID = "sample-browser-toolbar";
+
+    private static final String PREFIX = ID + "_";
 
     static final String REFRESH_BUTTON_ID = GenericConstants.ID_PREFIX + PREFIX + "refresh-button";
 
@@ -83,7 +85,7 @@ class SampleBrowserToolbar extends ToolBar
             final ParentColumns parentColumns, final PropertyColumns propertyColumns)
     {
         this.sampleBrowserGrid = sampleBrowserGrid;
-        selectSampleTypeCombo = new SampleTypeSelectionWidget(viewContext);
+        selectSampleTypeCombo = new SampleTypeSelectionWidget(viewContext, ID);
         selectGroupCombo = new GroupSelectionWidget(viewContext);
         includeInstanceCheckbox = new CheckBox();
         includeInstanceCheckbox.setId(INCLUDE_SHARED_CHECKBOX_ID);
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleTypeSelectionWidget.java
index 0c2e27e51c8b27be52f1f261da8a60d411759836..420858394a7dd0c95463fe887762173bf7905f7d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleTypeSelectionWidget.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/SampleTypeSelectionWidget.java
@@ -42,7 +42,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SampleType;
 public class SampleTypeSelectionWidget extends ComboBox<SampleTypeModel>
 {
 
-    final class ListSampleTypesCallback extends AbstractAsyncCallback<List<SampleType>>
+    public final class ListSampleTypesCallback extends AbstractAsyncCallback<List<SampleType>>
     {
         private final boolean allowEmptyCall;
 
@@ -78,9 +78,9 @@ public class SampleTypeSelectionWidget extends ComboBox<SampleTypeModel>
         }
     }
 
-    private static final String PREFIX = "sample-select";
+    private static final String PREFIX = "sample-type-select-";
 
-    static final String ID = GenericConstants.ID_PREFIX + PREFIX;
+    public static final String ID = GenericConstants.ID_PREFIX + PREFIX;
 
     private final IViewContext<ICommonClientServiceAsync> viewContext;
 
@@ -88,17 +88,18 @@ public class SampleTypeSelectionWidget extends ComboBox<SampleTypeModel>
 
     private final boolean allowEmpty;
 
-    public SampleTypeSelectionWidget(final IViewContext<ICommonClientServiceAsync> viewContext)
+    public SampleTypeSelectionWidget(final IViewContext<ICommonClientServiceAsync> viewContext,
+            String idSuffix)
     {
-        this(viewContext, false);
+        this(viewContext, false, idSuffix);
     }
 
     public SampleTypeSelectionWidget(final IViewContext<ICommonClientServiceAsync> viewContext,
-            final boolean allowEmpty)
+            final boolean allowEmpty, String idSuffix)
     {
         this.viewContext = viewContext;
         this.allowEmpty = allowEmpty;
-        setId(ID);
+        setId(ID + idSuffix);
         setEmptyText(allowEmpty ? "Choose sample type..." : "- No sample types found -");
         setEnabled(false);
         setDisplayField(ModelDataPropertyNames.CODE);
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationForm.java
index c7abfac22dd9ce14a4a730c4a653f1b5c57ac146..5e7d0bd517582c795e45202424d6746dbb41ddee 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationForm.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationForm.java
@@ -63,6 +63,21 @@ import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.IGenericClientS
  */
 public final class GenericSampleRegistrationForm extends FormPanel
 {
+
+    private static final String PREFIX = "generic-sample-registration_";
+
+    public static final String ID_PREFIX = GenericConstants.ID_PREFIX + PREFIX;
+
+    public static final String CODE_FIELD_ID = ID_PREFIX + "code";
+
+    public static final String SHARED_CHECKBOX_ID = ID_PREFIX + "shared";
+
+    public static final String PARENT_CONTAINER_FIELD_ID = ID_PREFIX + "parent-container";
+
+    public static final String PARENT_GENERATOR_FIELD_ID = ID_PREFIX + "parent-generator";
+
+    public static final String SAVE_BUTTON_ID = ID_PREFIX + "save-button";
+
     private static final String ETPT = "PROPERTY_TYPE";
 
     private static boolean SELECT_GROUP_BY_DEFAULT = true;
@@ -107,6 +122,7 @@ public final class GenericSampleRegistrationForm extends FormPanel
         infoBox = new InfoBox();
 
         code = new CodeField("Sample code", true);
+        code.setId(CODE_FIELD_ID);
         code.addListener(Events.Focus, new Listener<BaseEvent>()
             {
 
@@ -120,6 +136,7 @@ public final class GenericSampleRegistrationForm extends FormPanel
         groupSelectionWidget.setEnabled(SELECT_GROUP_BY_DEFAULT);
 
         sharedCheckbox = new CheckBox();
+        sharedCheckbox.setId(SHARED_CHECKBOX_ID);
         sharedCheckbox.setBoxLabel("Shared");
         sharedCheckbox.setValue(SELECT_GROUP_BY_DEFAULT == false);
         sharedCheckbox.addListener(Events.Change, new Listener<BaseEvent>()
@@ -150,8 +167,10 @@ public final class GenericSampleRegistrationForm extends FormPanel
             });
 
         parentGenerator = new VarcharField("Generated from sample", false);
+        parentGenerator.setId(PARENT_GENERATOR_FIELD_ID);
 
         parentContainer = new VarcharField("Part of sample", false);
+        parentContainer.setId(PARENT_CONTAINER_FIELD_ID);
 
         propertyFields = new ArrayList<Field<?>>();
         for (final SampleTypePropertyType stpt : sampleType.getSampleTypePropertyTypes())
@@ -184,6 +203,7 @@ public final class GenericSampleRegistrationForm extends FormPanel
         // bb.add(resetButton);
 
         Button saveButton = new Button("Save");
+        saveButton.setId(SAVE_BUTTON_ID);
         saveButton.addSelectionListener(new SelectionListener<ComponentEvent>()
             {
                 @Override
@@ -261,20 +281,26 @@ public final class GenericSampleRegistrationForm extends FormPanel
                 }
             }
             viewContext.getService().registerSample(sampleToRegister,
-                    new AbstractAsyncCallback<Void>(viewContext)
-                        {
-                            @Override
-                            protected void process(Void result)
-                            {
-
-                                String message =
-                                        createSuccessfullRegistrationInfo(
-                                                sharedCheckbox.getValue(), code.getValue(),
-                                                groupSelectionWidget.tryGetSelected());
-                                resetForm(message);
-
-                            }
-                        });
+                    new RegisterSampleCallback(viewContext));
+        }
+    }
+
+    public class RegisterSampleCallback extends AbstractAsyncCallback<Void>
+    {
+        public RegisterSampleCallback(IViewContext<?> viewContext)
+        {
+            super(viewContext);
+        }
+
+        @Override
+        protected void process(Void result)
+        {
+
+            String message =
+                    createSuccessfullRegistrationInfo(sharedCheckbox.getValue(), code.getValue(),
+                            groupSelectionWidget.tryGetSelected());
+            resetForm(message);
+
         }
     }
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/SystemTestSuite.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/SystemTestSuite.java
index 1e6d162c8bf38b15688721c5ad6d33d73c3649cf..efb6a63f7c7ff810f6b4b156baf824ff855ef478 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/SystemTestSuite.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/SystemTestSuite.java
@@ -25,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Authentica
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.AuthorizationManagementConsolTest;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.SampleBrowserTest;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.SearchTest;
+import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample.GenericSampleRegistrationTest;
 import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample.GenericSampleViewerTest;
 
 /**
@@ -40,6 +41,7 @@ public class SystemTestSuite extends GWTTestSuite
         testSuite.addTestSuite(SampleBrowserTest.class);
         testSuite.addTestSuite(GenericSampleViewerTest.class);
         testSuite.addTestSuite(SearchTest.class);
+        testSuite.addTestSuite(GenericSampleRegistrationTest.class);
         return testSuite;
     }
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ChooseTypeOfNewSample.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ChooseTypeOfNewSample.java
new file mode 100644
index 0000000000000000000000000000000000000000..5e8c89932bab72dfb3caff54f637613f51017bd5
--- /dev/null
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ChooseTypeOfNewSample.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui;
+
+import com.extjs.gxt.ui.client.widget.form.ComboBox;
+
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.SampleTypeModel;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample_browser.SampleTypeSelectionWidget;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
+import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand;
+import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil;
+
+/**
+ * A {@link AbstractDefaultTestCommand} extension for choosing the type of new sample.
+ * 
+ * @author Izabela Adamczyk
+ */
+public final class ChooseTypeOfNewSample extends AbstractDefaultTestCommand
+{
+    private final String sampleTypeNameOrNull;
+
+    public ChooseTypeOfNewSample(final String sampleTypeNameOrNull)
+    {
+        this.sampleTypeNameOrNull = sampleTypeNameOrNull;
+        addCallbackClass(SampleTypeSelectionWidget.ListSampleTypesCallback.class);
+    }
+
+    //
+    // AbstractDefaultTestCommand
+    //
+
+    public final void execute()
+    {
+        final ComboBox<SampleTypeModel> sampleTypeSelector =
+                (SampleTypeSelectionWidget) GWTTestUtil
+                        .getWidgetWithID(SampleTypeSelectionWidget.ID + SampleRegistrationPanel.ID);
+
+        GWTUtils.setSelectedItem(sampleTypeSelector, ModelDataPropertyNames.CODE,
+                sampleTypeNameOrNull);
+    }
+}
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/OpenTab.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/OpenTab.java
index 068a331dec8ba4cd0b7a2cc825bbdf3c6a156f4a..2644ef406e5138d5be34d0cdae334dbf15d30599 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/OpenTab.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/OpenTab.java
@@ -16,6 +16,8 @@
 
 package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui;
 
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.SessionContextCallback;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.LeftMenu;
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand;
@@ -32,13 +34,25 @@ public final class OpenTab extends AbstractDefaultTestCommand
 
     private final String option;
 
-    public OpenTab(final String category, final String option)
+    public OpenTab(final String category, final String option,
+            final Class<? extends AsyncCallback<?>> callbackClass)
     {
-        super(SessionContextCallback.class);
+        if (callbackClass == null)
+        {
+            addCallbackClass(SessionContextCallback.class);
+        } else
+        {
+            addCallbackClass(callbackClass);
+        }
         this.category = category;
         this.option = option;
     }
 
+    public OpenTab(final String category, final String option)
+    {
+        this(category, option, null);
+    }
+
     //
     // AbstractDefaultTestCommand
     //
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/CheckSampleTable.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/CheckSampleTable.java
index f8f2b3ee0d8ae1049da86bf11bbeb0b00214ff53..8a43dc75f61064cef157ed6d919a650e7bbac1ed 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/CheckSampleTable.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/CheckSampleTable.java
@@ -24,11 +24,11 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTab
  * 
  * @author Izabela Adamczyk
  */
-public final class CheckSampleTable extends CheckTableCommand
+public class CheckSampleTable extends CheckTableCommand
 {
     public CheckSampleTable()
     {
         super(SampleBrowserGrid.GRID_ID, SampleBrowserGrid.ListSamplesCallback.class);
     }
-    
+
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ListSamples.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ListSamples.java
index cd3934393662da540cf7254343982a2b2b639777..27096d2c11c0d506e53791fa5e112b8b2863eb3e 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ListSamples.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ListSamples.java
@@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestU
  * 
  * @author Christian Ribeaud
  */
-public final class ListSamples extends AbstractDefaultTestCommand
+public class ListSamples extends AbstractDefaultTestCommand
 {
     private final String sampleTypeNameOrNull;
 
@@ -56,14 +56,14 @@ public final class ListSamples extends AbstractDefaultTestCommand
     // AbstractDefaultTestCommand
     //
 
-    public final void execute()
+    public void execute()
     {
         final GroupSelectionWidget groupSelector =
                 (GroupSelectionWidget) GWTTestUtil.getWidgetWithID(GroupSelectionWidget.ID);
 
         final ComboBox<SampleTypeModel> sampleTypeSelector =
                 (SampleTypeSelectionWidget) GWTTestUtil
-                        .getWidgetWithID(SampleTypeSelectionWidget.ID);
+                        .getWidgetWithID(SampleTypeSelectionWidget.ID + SampleBrowserToolbar.ID);
 
         final CheckBox includeGroupCheckbox =
                 (CheckBox) GWTTestUtil
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java
index aa1f958754f7251fa25dcc8b11778329e840a1fb..55be967edba382bd0692c68f284baa469bf547f2 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java
@@ -38,7 +38,9 @@ public class CheckTableCommand extends AbstractDefaultTestCommand
 
     private int expectedNumberOfRows = -1;
 
-    private List<Row> expectedRows = new ArrayList<Row>();
+    private final List<Row> expectedRows = new ArrayList<Row>();
+
+    private final List<Row> unexpectedRows = new ArrayList<Row>();
 
     /**
      * Creates an instance for the specified table or grid ID.
@@ -69,6 +71,12 @@ public class CheckTableCommand extends AbstractDefaultTestCommand
         return this;
     }
 
+    public CheckTableCommand unexpectedRow(final Row row)
+    {
+        unexpectedRows.add(row);
+        return this;
+    }
+
     /**
      * Prepares this with the expectation upon a certain row to be appear in the table.
      */
@@ -108,6 +116,15 @@ public class CheckTableCommand extends AbstractDefaultTestCommand
         {
             assertEquals(expectedNumberOfRows, store.getCount());
         }
+
+        for (final Row unexpectedRow : unexpectedRows)
+        {
+            for (int i = 0; i < store.getCount(); i++)
+            {
+                final ModelData row = store.getAt(i);
+                assertFalse(match(unexpectedRow, row));
+            }
+        }
     }
 
     private boolean match(final Row expectedRow, final ModelData row)
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java
index 1efcdda195dc90f77d5ab125f5b81051a73a0ec7..eed900e2a9e4d07c8745b77cb6af13f2fea4f7c4 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java
@@ -31,6 +31,8 @@ import com.extjs.gxt.ui.client.widget.TabPanel;
 import com.extjs.gxt.ui.client.widget.button.Button;
 import com.extjs.gxt.ui.client.widget.form.AdapterField;
 import com.extjs.gxt.ui.client.widget.form.ComboBox;
+import com.extjs.gxt.ui.client.widget.form.Field;
+import com.extjs.gxt.ui.client.widget.form.MultiField;
 import com.extjs.gxt.ui.client.widget.form.TextField;
 import com.extjs.gxt.ui.client.widget.toolbar.AdapterToolItem;
 import com.extjs.gxt.ui.client.widget.tree.Tree;
@@ -292,6 +294,9 @@ public final class GWTTestUtil
             } else if (widget instanceof Container)
             {
                 return new ContainerHandler(this).handle((Container<Component>) widget);
+            } else if (widget instanceof MultiField)
+            {
+                return new MultiFieldHandler(this).handle((MultiField<Field<?>>) widget);
             } else
             {
                 return false;
@@ -396,4 +401,32 @@ public final class GWTTestUtil
 
     }
 
+    private static final class MultiFieldHandler implements IWidgetHandler<MultiField<Field<?>>>
+    {
+        private final IWidgetHandler<Widget> handler;
+
+        MultiFieldHandler(final IWidgetHandler<Widget> handler)
+        {
+            this.handler = handler;
+        }
+
+        //
+        // IWidgetHandler
+        //
+
+        public boolean handle(MultiField<Field<?>> widget)
+        {
+            final List<Field<?>> fields = widget.getAll();
+            for (int i = 0, n = fields.size(); i < n; i++)
+            {
+                if (handler.handle(fields.get(i)))
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+    }
+
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java
new file mode 100644
index 0000000000000000000000000000000000000000..5bfce41edbf23e66dccdd06095bdf9825cbee37a
--- /dev/null
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2008 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample;
+
+import com.extjs.gxt.ui.client.widget.form.CheckBox;
+import com.extjs.gxt.ui.client.widget.form.TextField;
+
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample_browser.GroupSelectionWidget;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
+import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand;
+import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil;
+
+/**
+ * A {@link AbstractDefaultTestCommand} extension for creating sample list.
+ * 
+ * @author Christian Ribeaud
+ */
+public final class FillSampleRegistrationForm extends AbstractDefaultTestCommand
+{
+
+    private final String code;
+
+    private final String groupNameOrNull;
+
+    private final boolean includeShared;
+
+    public FillSampleRegistrationForm(final boolean includeShared, final String groupNameOrNull,
+            final String code)
+    {
+        this.includeShared = includeShared;
+        this.groupNameOrNull = groupNameOrNull;
+        this.code = code;
+        addCallbackClass(GroupSelectionWidget.ListGroupsCallback.class);
+    }
+
+    //
+    // AbstractDefaultTestCommand
+    //
+
+    @SuppressWarnings("unchecked")
+    public final void execute()
+    {
+        final TextField<String> codeField =
+                (TextField<String>) GWTTestUtil
+                        .getWidgetWithID(GenericSampleRegistrationForm.CODE_FIELD_ID);
+        codeField.setValue(code);
+
+        final CheckBox includeSharedCheckbox =
+                (CheckBox) GWTTestUtil
+                        .getWidgetWithID(GenericSampleRegistrationForm.SHARED_CHECKBOX_ID);
+        includeSharedCheckbox.setValue(includeShared);
+
+        if (includeShared == false)
+        {
+            final GroupSelectionWidget groupSelector =
+                    (GroupSelectionWidget) GWTTestUtil.getWidgetWithID(GroupSelectionWidget.ID);
+            GWTUtils.setSelectedItem(groupSelector, ModelDataPropertyNames.CODE, groupNameOrNull);
+        }
+
+        GWTTestUtil.clickButtonWithID(GenericSampleRegistrationForm.SAVE_BUTTON_ID);
+    }
+}
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..be76ee4a10b3d05368cb5af0eef4eb2b7d8ad54d
--- /dev/null
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2008 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample;
+
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.CategoriesBuilder;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.ChooseTypeOfNewSample;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.Login;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.OpenTab;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample_browser.CheckSampleTable;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample_browser.ListSamples;
+import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample_browser.SampleRow;
+import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractGWTTestCase;
+
+/**
+ * A {@link AbstractGWTTestCase} extension to test {@link GenericSampleRegistrationForm}.
+ * 
+ * @author Izabela Adamczyk
+ */
+public class GenericSampleRegistrationTest extends AbstractGWTTestCase
+{
+
+    private static final String SHARED_CL = "SHARED_CL";
+
+    private static final String GROUP_CL = "GROUP_CL";
+
+    private static final String CONTROL_LAYOUT = "CONTROL_LAYOUT";
+
+    public final void testRegisterSharedSample()
+    {
+        remoteConsole.prepare(new Login("test", "a"));
+        remoteConsole.prepare(new OpenTab(CategoriesBuilder.CATEGORIES.SAMPLES,
+                CategoriesBuilder.MENU_ELEMENTS.REGISTER));
+        remoteConsole.prepare(new ChooseTypeOfNewSample(CONTROL_LAYOUT));
+        remoteConsole.prepare(new FillSampleRegistrationForm(true, null, SHARED_CL));
+        remoteConsole.prepare(new OpenTab(CategoriesBuilder.CATEGORIES.SAMPLES,
+                CategoriesBuilder.MENU_ELEMENTS.LIST,
+                GenericSampleRegistrationForm.RegisterSampleCallback.class));
+        remoteConsole.prepare(new ListSamples(true, true, "CISD", CONTROL_LAYOUT));
+        remoteConsole.prepare(new CheckSampleTable().expectedRow(new SampleRow(SHARED_CL)
+                .identifier("CISD")));
+        remoteConsole.finish(20000);
+        client.onModuleLoad();
+    }
+
+    public final void testRegisterGroupSample()
+    {
+        remoteConsole.prepare(new Login("test", "a"));
+        remoteConsole.prepare(new OpenTab(CategoriesBuilder.CATEGORIES.SAMPLES,
+                CategoriesBuilder.MENU_ELEMENTS.REGISTER));
+        remoteConsole.prepare(new ChooseTypeOfNewSample(CONTROL_LAYOUT));
+        remoteConsole.prepare(new FillSampleRegistrationForm(false, "CISD", GROUP_CL));
+        remoteConsole.prepare(new OpenTab(CategoriesBuilder.CATEGORIES.SAMPLES,
+                CategoriesBuilder.MENU_ELEMENTS.LIST,
+                GenericSampleRegistrationForm.RegisterSampleCallback.class));
+        remoteConsole.prepare(new ListSamples(true, true, "CISD", CONTROL_LAYOUT));
+        remoteConsole.prepare(new CheckSampleTable().expectedRow(new SampleRow(GROUP_CL)
+                .identifier("CISD", "CISD")));
+        remoteConsole.finish(20000);
+        client.onModuleLoad();
+    }
+}