use of com.google.cloud.teleport.v2.templates.spanner.ddl.Ddl in project DataflowTemplates by GoogleCloudPlatform.
the class ChangeEventConvertorTest method cannotConvertChangeEventWithInvalidInt64ToShadowMutation.
@Test(expected = ChangeEventConvertorException.class)
public void cannotConvertChangeEventWithInvalidInt64ToShadowMutation() throws Exception {
Ddl ddl = getTestDdl();
JSONObject changeEvent = getTestChangeEvent("Users2");
changeEvent.put("int64_field", "asdfas");
JsonNode ce = parseChangeEvent(changeEvent.toString());
Mutation mutation = ChangeEventConvertor.changeEventToShadowTableMutationBuilder(ddl, ce, "shadow_").build();
// Expect an Exception to be thrown with Invalid int64
}
Aggregations