### Question:
JcrDataSourceProvider extends BaseJcrProvider<DataSource, DataSource.ID> implements DataSourceProvider { @Override public DataSource create(ID connId, String title) { return this.connectorProvider.find(connId) .map(conn -> { String systemName = generateSystemName(title); Path dsPath = MetadataPaths.dataSourcePath(conn.getSystemName(), systemName); if (JcrUtil.hasNode(getSession(), dsPath)) { throw DataSourceAlreadyExistsException.fromSystemName(title); } else { Node connNode = JcrUtil.createNode(getSession(), dsPath, JcrDataSource.NODE_TYPE); JcrDataSource dsrc = JcrUtil.createJcrObject(connNode, JcrDataSource.class); dsrc.setTitle(title); if (this.accessController.isEntityAccessControlled()) { final List<SecurityRole> roles = roleProvider.getEntityRoles(SecurityRole.DATASOURCE); actionsProvider.getAvailableActions(AllowedActions.DATASOURCE) .ifPresent(actions -> dsrc.enableAccessControl((JcrAllowedActions) actions, JcrMetadataAccess.getActiveUser(), roles)); } else { actionsProvider.getAvailableActions(AllowedActions.DATASOURCE) .ifPresent(actions -> dsrc.disableAccessControl(JcrMetadataAccess.getActiveUser())); } return dsrc; } }) .orElseThrow(() -> new ConnectorNotFoundException(connId)); }  @Override DataSource.ID resolveId(Serializable fid); @Override DataSource create(ID connId, String title); @Override List<DataSource> findByConnector(ID connId, ID... moreIds); @Override List<DataSource> findByConnector(Collection<ID> connIds); @Override Optional<DataSource> find(com.thinkbiganalytics.metadata.api.catalog.DataSource.ID id); @Override Class<? extends JcrEntity<?>> getJcrEntityClass(); @Override String getNodeType(Class<? extends JcrObject> jcrEntityType); @Override Optional<DataSource> findByNifiControlerServiceId(final String serviceId); String generateSystemName(String title);  }### Answer:
@Test public void testCreate() { this.dsId = metadata.commit(() -> { DataSource ds = null; for (int i = 1; i <= COUNT + 1; i++) { ds = createDataSource(i); } return ds.getId(); }, MetadataAccess.SERVICE); metadata.read(() -> { Optional<DataSource> ds = this.dsProvider.find(this.dsId); assertThat(ds).isNotNull().isPresent(); assertThat(ds.get()).extracting("systemName", "title", "description").contains(dsTuple(COUNT + 1).toArray()); assertThat(ds.get().getConnector()).isNotNull().extracting("id").contains(this.connId); }, MetadataAccess.SERVICE); }