NamedClusterWidgetBridgedImpl implements NamedClusterWidget { @Override public NamedCluster getSelectedNamedCluster() { return NamedClusterBridgeImpl.fromOsgiNamedCluster( namedClusterWidget.getSelectedNamedCluster() ); } NamedClusterWidgetBridgedImpl( NamedClusterWidgetImpl namedClusterWidget ); @Override void initiate(); @Override Composite getComposite(); @Override NamedCluster getSelectedNamedCluster(); @Override void setSelectedNamedCluster( String name ); @Override void addSelectionListener( SelectionListener selectionListener );  }
@Test public void testGetSelectedNamedCluster() { org.pentaho.hadoop.shim.api.cluster.NamedCluster namedCluster = mock( org.pentaho.hadoop.shim.api.cluster.NamedCluster.class ); String testName = "testName"; when( namedCluster.getName() ).thenReturn( testName ); when( namedClusterWidget.getSelectedNamedCluster() ).thenReturn( namedCluster ); assertEquals( testName, namedClusterWidgetBridged.getSelectedNamedCluster().getName() ); }