resourceConfig.put(new PropertySimple("driver-name", "h2"));
resourceConfig.put(new PropertySimple("jndi-name", "java:jboss/datasources/" + getTestDatasourceName()));
resourceConfig.put(new PropertyList("*1", new PropertyMap("*:pname", new PropertySimple("pname",
"DatasourceTestKey"), new PropertySimple("value", "DatasourceTestValue"))));
CreateResourceRequest createRequest = new CreateResourceRequest();
createRequest.setParentResourceId(datasourcesSubsystemResource.getId());
createRequest.setPluginConfiguration(pluginConfig);
createRequest.setPluginName(PLUGIN_NAME);
createRequest.setResourceConfiguration(resourceConfig);
createRequest.setResourceName(getTestDatasourceName());
createRequest.setResourceTypeName(datasourceResourceType.getName());
CreateResourceResponse createResourceResponse = pluginContainer.getResourceFactoryManager()
.executeCreateResourceImmediately(createRequest);
assertEquals(createResourceResponse.getStatus(), SUCCESS, createResourceResponse.getErrorMessage());