### Question:
NoteInfosActivity extends Activity { static String getChecklistCompletionState (StatsSingleNote infos) { int percentage = Math.round((float) infos.getChecklistCompletedItemsNumber() / infos.getChecklistItemsNumber() * 100); return infos.getChecklistCompletedItemsNumber() + " (" + percentage + "%)"; }    }### Answer:
@Test public void getChecklistCompletionState () { StatsSingleNote infos = new StatsSingleNote(); infos.setChecklistItemsNumber(42); infos.setChecklistCompletedItemsNumber(12); String completionState = NoteInfosActivity.getChecklistCompletionState(infos); assertTrue(completionState.contains(infos.getChecklistCompletedItemsNumber() + "")); assertTrue(completionState.contains("29%")); }