type.addFieldType("field3", intType);
type.addFieldType("field4", intType);
type.complete();
// Create simple accessor for use in the tests
TestPolicyDescriptorAccessor accessor =
new TestPolicyDescriptorAccessor();
accessor.addPolicyDescriptor(null, "policyname.field1", textType);
accessor.addPolicyDescriptor(null, "policyname.field2", booleanType);
accessor.addPolicyDescriptor(null, "policyname.field3", intType);
accessor.addPolicyDescriptor(null, "policyname.field4", intType);
accessor.addPolicyDescriptor(null, "policyname", type);
// Create a device to pass into the factory
final Map policies = new HashMap();
policies.put("policyname.field1", "Some text");
policies.put("policyname.field2", "true");