@Test
public void testCustomProperties() {
final String propName = "my.custom.property";
final String propValue = "string";
DatasetDescriptor descriptorWithProp =
new DatasetDescriptor.Builder(testDescriptor)
.property(propName, propValue)
.build();
DatasetDescriptor created = provider.create(NAMESPACE, NAME, descriptorWithProp);
Assert.assertTrue("Should have custom property",
created.hasProperty(propName));
Assert.assertEquals("Should have correct custom property value",
propValue, created.getProperty(propName));
Assert.assertTrue("List should contain property name",
created.listProperties().contains(propName));
DatasetDescriptor loaded = provider.load(NAMESPACE, NAME);
Assert.assertTrue("Should have custom property",
loaded.hasProperty(propName));
Assert.assertEquals("Should have correct custom property value",
propValue, loaded.getProperty(propName));
Assert.assertTrue("List should contain property name",
created.listProperties().contains(propName));
}