1718192021222324252627
} @Test (expected = IllegalStateException.class) public void modifyEncapsulatedObject_viaTheBuilder() { ArmBuilder builder = Arm.build(); builder.asArm(); // Trying to modify state after encapsulation. builder.withArmLength(10); }