### Question:
DataSourceWizardService extends DatasourceService { public RepositoryFileAclDto getDSWAcl( String dswId ) throws PentahoAccessControlException, FileNotFoundException { checkDSWExists( dswId ); if ( aclAwarePentahoMetadataDomainRepositoryImporter != null ) { final RepositoryFileAcl acl = aclAwarePentahoMetadataDomainRepositoryImporter.getAclFor( dswId ); return acl == null ? null : repositoryFileAclAdapter.marshal( acl ); } return null; } DataSourceWizardService(); Map<String, InputStream> doGetDSWFilesAsDownload( String dswId ); void removeDSW( String dswId ); List<String> getDSWDatasourceIds(); String publishDsw( String domainId, InputStream metadataFile, boolean overwrite, boolean checkConnection,
      RepositoryFileAclDto acl ); String publishDsw( String domainId, InputStream metadataFile, List<InputStream> localizeFiles, List<String> localizeFileNames,
      boolean overwrite, boolean checkConnection, RepositoryFileAclDto acl ); String publishDswFromTemp( String domainId,
      MetadataTempFilesListDto fileList,
      boolean overwrite,
      boolean checkConnection,
      RepositoryFileAclDto acl ); RepositoryFileAclDto getDSWAcl( String dswId ); void setDSWAcl( String dswId, RepositoryFileAclDto aclDto ); static final String METADATA_EXT; }### Answer:
@Test public void testGetDSWAcl() throws Exception { String domainId = "domainId"; final RepositoryFileAcl acl = new RepositoryFileAcl.Builder( "owner" ).build(); doReturn( true ).when( dataSourceWizardService ).canManageACL(); when( dataSourceWizardService.aclAwarePentahoMetadataDomainRepositoryImporter.getAclFor( domainId ) ).thenReturn( acl ); final IUnifiedRepository repository = mock( IUnifiedRepository.class ); final RepositoryFile repositoryFile = mock( RepositoryFile.class ); when( repository.getFileById( anyString() ) ).thenReturn( repositoryFile ); doReturn( new HashMap<String, InputStream>() ).when( dataSourceWizardService ).doGetDSWFilesAsDownload( domainId ); final RepositoryFileAclDto aclDto = dataSourceWizardService.getDSWAcl( domainId ); verify( dataSourceWizardService.aclAwarePentahoMetadataDomainRepositoryImporter ).getAclFor( eq( domainId ) ); assertEquals( acl, new RepositoryFileAclAdapter().unmarshal( aclDto ) ); }