### Question:
FragmentHandler extends AbstractXulEventHandler { protected String getFragment( DatabaseInterface database, String dbName, String extension, String defaultFragment ) { String fragment; String ext = ( extension == null ? "" : extension ); String databaseName = ( dbName == null ? "" : dbName ); String defaultFrag = ( defaultFragment == null ? "" : defaultFragment ); if ( database.getXulOverlayFile() != null ) { fragment = packagePath.concat( database.getXulOverlayFile() ).concat( ext ); } else { fragment = packagePath.concat( databaseName ).concat( ext ); } InputStream in = getClass().getClassLoader().getResourceAsStream( fragment.toLowerCase() ); if ( in == null ) { fragment = packagePath.concat( defaultFrag ); } return fragment; } FragmentHandler(); void refreshOptions(); Object getData(); void setData( Object arg0 );  }### Answer:
@Test public void testGetFragment() throws Exception { DatabaseInterface dbInterface = mock( DatabaseInterface.class ); assertEquals( "org/pentaho/ui/database/", fragmentHandler.getFragment( dbInterface, null, null, null ) ); when( dbInterface.getXulOverlayFile() ).thenReturn( "overlay.xul" ); assertEquals( "org/pentaho/ui/database/", fragmentHandler.getFragment( dbInterface, null, null, null ) ); }