|
17 | 17 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
18 | 18 |
|
19 | 19 | import com.fasterxml.jackson.databind.JsonNode;
|
| 20 | +import com.fasterxml.jackson.databind.node.JsonNodeType; |
20 | 21 | import com.fasterxml.jackson.databind.node.ObjectNode;
|
21 | 22 | import io.airbyte.cdk.db.DataTypeUtils;
|
22 | 23 | import io.airbyte.commons.json.Jsons;
|
@@ -150,7 +151,8 @@ void testTransformDataTypes() {
|
150 | 151 | assertEquals("code2", transformed.get("field13").get("code").asText());
|
151 | 152 | assertEquals("scope", transformed.get("field13").get("scope").get("scope").asText());
|
152 | 153 | assertEquals("pattern", transformed.get("field14").asText());
|
153 |
| - assertFalse(transformed.has("field15")); |
| 154 | + assertTrue(transformed.has("field15")); |
| 155 | + assertEquals(JsonNodeType.NULL, transformed.get("field15").getNodeType()); |
154 | 156 | assertEquals("value", transformed.get("field16").get("key").asText());
|
155 | 157 | // Assert that UUIDs can be serialized. Currently, they will be represented as base 64 encoded
|
156 | 158 | // strings. Since the original mongo source
|
@@ -247,7 +249,8 @@ void testTransformDataTypesNoSchema() {
|
247 | 249 | assertTrue(abDataNode.has("field12"));
|
248 | 250 | assertTrue(abDataNode.has("field13"));
|
249 | 251 | assertTrue(abDataNode.has("field14"));
|
250 |
| - assertFalse(abDataNode.has("field15")); |
| 252 | + assertTrue(abDataNode.has("field15")); |
| 253 | + assertEquals(JsonNodeType.NULL, abDataNode.get("field15").getNodeType()); |
251 | 254 | assertTrue(abDataNode.has("field16"));
|
252 | 255 | }
|
253 | 256 |
|
|
0 commit comments