https://kotlinlang.org logo
#mockk
Title
# mockk
i

Iwan Aucamp

06/10/2022, 2:21 PM
I'm trying to mock google pubsub Publisher
Copy code
2022-06-10 16:05:52,447 ERROR [io.qua.test] (Test runner thread) Test EventServiceTest failed 
: java.lang.NoSuchMethodError: com.google.cloud.pubsub.v1.Publisher: method 'void <init>()' not found
        at com.google.cloud.pubsub.v1.PubSubProviders_ProducerMethod_publisher_d487368ec6013065bb45001d5339f823b74b492b_ClientProxy.<init>(Unknown Source)
        at no.coop.sapcrm.profile.events.PubSubProviders_ProducerMethod_publisher_d487368ec6013065bb45001d5339f823b74b492b_Bean.proxy(Unknown Source)
        at no.coop.sapcrm.profile.events.PubSubProviders_ProducerMethod_publisher_d487368ec6013065bb45001d5339f823b74b492b_Bean.get(Unknown Source)
        at no.coop.sapcrm.profile.events.PubSubProviders_ProducerMethod_publisher_d487368ec6013065bb45001d5339f823b74b492b_Bean.get(Unknown Source)
        at io.quarkus.arc.impl.InstanceImpl.getBeanInstance(InstanceImpl.java:223)
        at io.quarkus.arc.impl.InstanceImpl.getInternal(InstanceImpl.java:209)
        at io.quarkus.arc.impl.InstanceImpl.get(InstanceImpl.java:95)
        at io.quarkus.test.junit.QuarkusMock.installMockForType(QuarkusMock.java:57)
        at no.coop.sapcrm.profile.events.EventServiceTest.setupMocks(EventServiceTest.kt:40)
but it does not work
nevermind, restarting fixed it
10 Views