Branch { boolean canBloom() { return RainbowMath.abs(radius) > MIN_RADIUS_TO_BLOOM; } Branch(RVector position, float angle, float radius, float step); static Branch createAt(float x, float y); float getX(); float getY(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testThatCanBloomReturnsFalseIfRadiusIsLowerThanMinBloomRadius() { branch = new Branch(new RVector(ANY_POSITION, ANY_POSITION), ANY_ANGLE, RADIUS_TO_BLOOM_UNDER_MIN, 0); assertThat(branch.canBloom()).isFalse(); }
@Test public void testThatIsDeadReturnsTrueIfRadiusIsGreaterThanMinBloomRadius() { branch = new Branch(new RVector(ANY_POSITION, ANY_POSITION), ANY_ANGLE, RADIUS_TO_BLOOM_OVER_MIN, 0); assertThat(branch.canBloom()).isTrue(); }