Commits

kubek2k  committed 4b802ba

Fixed extrainterfaces support

  • Participants
  • Parent commits 5e57cb2

Comments (0)

Files changed (1)

File springockito-annotations/src/main/java/org/kubek2k/springockito/annotations/factory/MockFactoryBean.java

     }
 
     private T createInstance() {
-        MockSettings mockSettings = new MockSettingsImpl().extraInterfaces(extraInterfaces);
+        MockSettings mockSettings = new MockSettingsImpl();
+
+        if (extraInterfaces.length > 0) {
+            mockSettings = mockSettings.extraInterfaces(extraInterfaces);
+        }
 
         if (defaultAnswer != null) {
             mockSettings = mockSettings.defaultAnswer(defaultAnswer.get());