public class TestClass {
public static final int INITIAL_VALUE = 12;
public static final int UPDATED_VALUE = 42;
private int field = INITIAL_VALUE;
public void setField(int value) {
this.field = value;
}
public int getField() {
return this.field;
}
public static void main(String[] args) {
Map<String, Serializable> props = new HashMap<>();
props.put("field", UPDATED_VALUE);
IgniteReflectionFactory<ExampleNodeStartup.TestClass> factory = new IgniteReflectionFactory<>(ExampleNodeStartup.TestClass.class);
factory.setProperties(props);
assertEquals(UPDATED_VALUE, factory.create().getField());
}
}