Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mock registry.getEntityJoinKey
Signed-off-by: Yongheng Lin <yongheng.lin@gmail.com>
  • Loading branch information
yongheng committed Jun 24, 2022
commit f5b12ef1ee057edcbf8e53f54fc8e1fcc599ca94
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ public void shouldReturnResponseWithValuesAndMetadataIfKeysPresent() {
.thenReturn(featureSpecs.get(0));
when(registry.getFeatureSpec(mockedFeatureRows.get(3).getFeatureReference()))
.thenReturn(featureSpecs.get(1));
when(registry.getEntityJoinKey("entity1")).thenReturn("entity1");
when(registry.getEntityJoinKey("entity2")).thenReturn("entity2");

when(tracer.buildSpan(ArgumentMatchers.any())).thenReturn(Mockito.mock(SpanBuilder.class));

Expand Down Expand Up @@ -237,6 +239,8 @@ public void shouldReturnResponseWithUnsetValuesAndMetadataIfKeysNotPresent() {
.thenReturn(featureSpecs.get(0));
when(registry.getFeatureSpec(mockedFeatureRows.get(1).getFeatureReference()))
.thenReturn(featureSpecs.get(1));
when(registry.getEntityJoinKey("entity1")).thenReturn("entity1");
when(registry.getEntityJoinKey("entity2")).thenReturn("entity2");

when(tracer.buildSpan(ArgumentMatchers.any())).thenReturn(Mockito.mock(SpanBuilder.class));

Expand Down Expand Up @@ -314,6 +318,8 @@ public void shouldReturnResponseWithValuesAndMetadataIfMaxAgeIsExceeded() {
.thenReturn(featureSpecs.get(1));
when(registry.getFeatureSpec(mockedFeatureRows.get(5).getFeatureReference()))
.thenReturn(featureSpecs.get(0));
when(registry.getEntityJoinKey("entity1")).thenReturn("entity1");
when(registry.getEntityJoinKey("entity2")).thenReturn("entity2");

when(tracer.buildSpan(ArgumentMatchers.any())).thenReturn(Mockito.mock(SpanBuilder.class));

Expand Down