@Test public void fieldsReassignment() { Integer integerField1 = 42; Integer integerField2 = 69; FieldsBean fieldsBean = FieldsBeanBuilder.create() .integerField(integerField1) .integerField(integerField2) .build(); assertSame(integerField2, fieldsBean.getIntegerField()); }
public Integer getIntegerField() { return integerField; }
FieldsBean { public Integer getIntegerField() { return integerField; } }
FieldsBean { public Integer getIntegerField() { return integerField; } FieldsBean(int intField, String stringField, Integer integerField, SomeObject someObjectField); }
FieldsBean { public Integer getIntegerField() { return integerField; } FieldsBean(int intField, String stringField, Integer integerField, SomeObject someObjectField); int getIntField(); String getStringField(); Integer getIntegerField(); SomeObject getSomeObjectField(); }
FieldsBean { public Integer getIntegerField() { return integerField; } FieldsBean(int intField, String stringField, Integer integerField, SomeObject someObjectField); int getIntField(); String getStringField(); Integer getIntegerField(); SomeObject getSomeObjectField();  }