@Test
public void testAllMethodsOfHashCodeBuilder() {
- final HashCodeBuilder<String> hashCodeBuilder = new HashCodeBuilder<>();
- assertEquals("Default hash code should be '1'.", 1, hashCodeBuilder.build().intValue());
+ final HashCodeBuilder<String> builder = new HashCodeBuilder<>();
+ assertEquals("Default hash code should be '1'.", 1, builder.build().intValue());
int nextHashCode = HashCodeBuilder.nextHashCode(1, "test");
assertEquals("Next hash code should be '3556529'.", 3556529, nextHashCode);
- hashCodeBuilder.addArgument("another test");
- assertEquals("Updated internal hash code should be '700442706'.", -700442706, hashCodeBuilder.build().intValue());
+ builder.addArgument("another test");
+ assertEquals("Updated internal hash code should be '700442706'.", -700442706, builder.build().intValue());
}
}