13
13
import com .linkedin .data .schema .annotation .PathSpecBasedSchemaAnnotationVisitor ;
14
14
import com .linkedin .metadata .entity .EntityService ;
15
15
import com .linkedin .metadata .entity .ebean .batch .AspectsBatchImpl ;
16
- import com .linkedin .metadata .entity .ebean .batch .MCPUpsertBatchItem ;
16
+ import com .linkedin .metadata .entity .ebean .batch .ChangeItemImpl ;
17
17
import com .linkedin .metadata .models .registry .ConfigEntityRegistry ;
18
18
import com .linkedin .metadata .models .registry .EntityRegistry ;
19
19
import com .linkedin .mxe .MetadataChangeProposal ;
22
22
23
23
public class TestUtils {
24
24
25
- public static EntityService <MCPUpsertBatchItem > getMockEntityService () {
25
+ public static EntityService <ChangeItemImpl > getMockEntityService () {
26
26
PathSpecBasedSchemaAnnotationVisitor .class
27
27
.getClassLoader ()
28
28
.setClassAssertionStatus (PathSpecBasedSchemaAnnotationVisitor .class .getName (), false );
29
29
EntityRegistry registry =
30
30
new ConfigEntityRegistry (TestUtils .class .getResourceAsStream ("/test-entity-registry.yaml" ));
31
- EntityService <MCPUpsertBatchItem > mockEntityService =
32
- (EntityService <MCPUpsertBatchItem >) Mockito .mock (EntityService .class );
31
+ EntityService <ChangeItemImpl > mockEntityService =
32
+ (EntityService <ChangeItemImpl >) Mockito .mock (EntityService .class );
33
33
Mockito .when (mockEntityService .getEntityRegistry ()).thenReturn (registry );
34
34
return mockEntityService ;
35
35
}
@@ -111,14 +111,14 @@ public static QueryContext getMockDenyContext(String actorUrn, AuthorizationRequ
111
111
}
112
112
113
113
public static void verifyIngestProposal (
114
- EntityService <MCPUpsertBatchItem > mockService ,
114
+ EntityService <ChangeItemImpl > mockService ,
115
115
int numberOfInvocations ,
116
116
MetadataChangeProposal proposal ) {
117
117
verifyIngestProposal (mockService , numberOfInvocations , List .of (proposal ));
118
118
}
119
119
120
120
public static void verifyIngestProposal (
121
- EntityService <MCPUpsertBatchItem > mockService ,
121
+ EntityService <ChangeItemImpl > mockService ,
122
122
int numberOfInvocations ,
123
123
List <MetadataChangeProposal > proposals ) {
124
124
AspectsBatchImpl batch =
@@ -128,29 +128,29 @@ public static void verifyIngestProposal(
128
128
}
129
129
130
130
public static void verifySingleIngestProposal (
131
- EntityService <MCPUpsertBatchItem > mockService ,
131
+ EntityService <ChangeItemImpl > mockService ,
132
132
int numberOfInvocations ,
133
133
MetadataChangeProposal proposal ) {
134
134
Mockito .verify (mockService , Mockito .times (numberOfInvocations ))
135
135
.ingestProposal (Mockito .eq (proposal ), Mockito .any (AuditStamp .class ), Mockito .eq (false ));
136
136
}
137
137
138
138
public static void verifyIngestProposal (
139
- EntityService <MCPUpsertBatchItem > mockService , int numberOfInvocations ) {
139
+ EntityService <ChangeItemImpl > mockService , int numberOfInvocations ) {
140
140
Mockito .verify (mockService , Mockito .times (numberOfInvocations ))
141
141
.ingestProposal (Mockito .any (AspectsBatchImpl .class ), Mockito .eq (false ));
142
142
}
143
143
144
144
public static void verifySingleIngestProposal (
145
- EntityService <MCPUpsertBatchItem > mockService , int numberOfInvocations ) {
145
+ EntityService <ChangeItemImpl > mockService , int numberOfInvocations ) {
146
146
Mockito .verify (mockService , Mockito .times (numberOfInvocations ))
147
147
.ingestProposal (
148
148
Mockito .any (MetadataChangeProposal .class ),
149
149
Mockito .any (AuditStamp .class ),
150
150
Mockito .eq (false ));
151
151
}
152
152
153
- public static void verifyNoIngestProposal (EntityService <MCPUpsertBatchItem > mockService ) {
153
+ public static void verifyNoIngestProposal (EntityService <ChangeItemImpl > mockService ) {
154
154
Mockito .verify (mockService , Mockito .times (0 ))
155
155
.ingestProposal (Mockito .any (AspectsBatchImpl .class ), Mockito .anyBoolean ());
156
156
}
0 commit comments