### Question:
ScenarioIgnoreCountDTO { public int getPercent() { return (total == 0 ? 0 : (int) Math.ceil(100 * ignored / (double) total)); }  int getPercent();  }### Answer:
@Test public void getPercent_returns_0_when_no_total() { ScenarioIgnoreCountDTO count = new ScenarioIgnoreCountDTO().withTotal(0); assertThat(count.getPercent()).isEqualTo(0); }
@Test public void getPercent_returns_correct_percentage() { ScenarioIgnoreCountDTO count = new ScenarioIgnoreCountDTO().withIgnored(1).withTotal(4); assertThat(count.getPercent()).isEqualTo(25); }
@Test public void getPercent_returns_ceiled_percentage() { ScenarioIgnoreCountDTO count = new ScenarioIgnoreCountDTO().withIgnored(991).withTotal(1000); assertThat(count.getPercent()).isEqualTo(100); }