void () { // enable custom mode myResultsViewer.onCustomProgressTestsCategory("Foo", 4); assertTrue(myResultsViewer.getMentionedCategories().isEmpty()); myResultsViewer.onTestStarted(createTestProxy("some_test1", myTestsRootNode)); assertTrue(myResultsViewer.getMentionedCategories().isEmpty()); myResultsViewer.onCustomProgressTestStarted(); assertSameElements(myResultsViewer.getMentionedCategories(), "Foo"); // disable custom mode myResultsViewer.onCustomProgressTestsCategory(null, 0); assertSameElements(myResultsViewer.getMentionedCategories(), "Foo"); }