use of org.springframework.cloud.gcp.data.spanner.core.convert.SpannerEntityProcessor in project spring-cloud-gcp by spring-cloud.
the class SpannerStatementQueryTests method initMocks.
@Before
public void initMocks() throws NoSuchMethodException {
this.queryMethod = mock(SpannerQueryMethod.class);
// this is a dummy object. it is not mockable otherwise.
Method method = Object.class.getMethod("toString");
when(this.queryMethod.getMethod()).thenReturn(method);
this.spannerTemplate = mock(SpannerTemplate.class);
SpannerEntityProcessor spannerEntityProcessor = mock(SpannerEntityProcessor.class);
when(this.spannerTemplate.getSpannerEntityProcessor()).thenReturn(spannerEntityProcessor);
when(spannerEntityProcessor.getWriteConverter()).thenReturn(new SpannerWriteConverter());
this.spannerMappingContext = new SpannerMappingContext();
}
Aggregations