dongzl commented on a change in pull request #432:
URL: 
https://github.com/apache/incubator-eventmesh/pull/432#discussion_r670055179



##########
File path: 
eventmesh-spi/src/test/java/org/apache/eventmesh/spi/EventMeshExtensionFactoryTest.java
##########
@@ -17,13 +17,24 @@
 
 package org.apache.eventmesh.spi;
 
+import org.apache.eventmesh.spi.example.TestPrototypeExtension;
+import org.apache.eventmesh.spi.example.TestSingletonExtension;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class EventMeshExtensionFactoryTest {
 
     @Test
-    public void getExtension() {
-        TestExtension extensionA = 
EventMeshExtensionFactory.getExtension(TestExtension.class, "extensionA");
-        extensionA.hello();
+    public void getSingletonExtensionTest() {
+        TestSingletonExtension extensionA = 
EventMeshExtensionFactory.getExtension(TestSingletonExtension.class, 
"singletonExtension");
+        TestSingletonExtension extensionB = 
EventMeshExtensionFactory.getExtension(TestSingletonExtension.class, 
"singletonExtension");
+        Assert.assertSame(extensionA, extensionB);
+    }
+
+    @Test
+    public void getPrototypeExtensionTest() {

Review comment:
       The save to above.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to