assertEquals( c.getType(), c2.getType() );
}
@Test
public void testPopulateEmptyString() throws Exception {
Cheese cheese = new Cheese();
cheese.setType( "whee" );
cheese.setPrice( 1 );
populatedData.put( "x", cheese );
assertEquals( 1, cheese.getPrice() );
//An empty String is a 'value' as opposed to null
factPopulator.add(
new ExistingFactPopulator(
populatedData,
getTypeResolver(),
new FactData(
"Cheese",
"x",
Arrays.<Field>asList(
new FieldData(
"type",
"" ),
new FieldData(
"price",
"42" ) ),
false ) ) );
factPopulator.populate();
assertEquals( "", cheese.getType() );
assertEquals( 42, cheese.getPrice() );
}