use of org.apache.servicecomb.provider.pojo.TestPojoConsumerProvider in project incubator-servicecomb-java-chassis by apache.
the class MockUtil method mockMicroserviceMeta.
public void mockMicroserviceMeta() {
new MockUp<MicroserviceMeta>() {
@Mock
public SchemaMeta ensureFindSchemaMeta(String schemaId) {
SchemaMeta lSchemaMeta = Mockito.mock(SchemaMeta.class);
Mockito.when(lSchemaMeta.getSwaggerIntf()).thenAnswer(new Answer<Class<? extends TestPojoConsumerProvider>>() {
@Override
public Class<? extends TestPojoConsumerProvider> answer(InvocationOnMock invocation) throws Throwable {
return TestPojoConsumerProvider.class;
}
});
return lSchemaMeta;
}
@Mock
public SchemaMeta ensureFindSchemaMeta(Class<?> schemaIntf) {
return Mockito.mock(SchemaMeta.class);
}
};
}
Aggregations