@Test public void testChangelogEnabled() { Map<String, String> tableConfig = createTableDescriptor() .withChangelogEnabled() .toConfig(createJobConfig()); Assert.assertEquals(2, tableConfig.size()); Assert.assertEquals("test-job-10-table-t1", String.format( tableConfig.get(String.format(StorageConfig.CHANGELOG_STREAM(), TABLE_ID)))); }
@Test(expected = NullPointerException.class) public void testChangelogWithoutJobId() { Map<String, String> jobConfig = new HashMap<>(); jobConfig.put("job.name", JOB_NAME); createTableDescriptor() .withChangelogEnabled() .toConfig(new MapConfig(jobConfig)); }
@Test(expected = NullPointerException.class) public void testChangelogWithoutJobName() { Map<String, String> jobConfig = new HashMap<>(); jobConfig.put("job.id", JOB_ID); createTableDescriptor() .withChangelogEnabled() .toConfig(new MapConfig(jobConfig)); }