public void testSimpleFields() throws Exception {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
TypeResolver typeResolver = new ClassTypeResolver(new HashSet<String>(),classLoader );
typeResolver.addImport("org.drools.guvnor.models.testscenarios.backend.Cheese");
Mouse mouse = new Mouse();
FactAssignmentField factAssignmentField = new FactAssignmentField("cheese", "Cheese");
factAssignmentField.getFact().getFieldData().add(new FieldData("type", "Best cheddar EVER! (tm)"));
FactAssignmentFieldPopulator factAssignmentFieldPopulator = new FactAssignmentFieldPopulator(mouse, factAssignmentField, typeResolver, classLoader);
factAssignmentFieldPopulator.populate(new HashMap<String, Object>());
assertEquals("Best cheddar EVER! (tm)", mouse.getCheese().getType());
}