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); myResultsViewer.onCustomProgressTestStarted(); assertSameElements(myResultsViewer.getMentionedCategories(), "Foo"); myResultsViewer.onTestStarted(createTestProxy("some_test2", myTestsRootNode)); assertSameElements(myResultsViewer.getMentionedCategories(), "Foo", TestsPresentationUtil.DEFAULT_TESTS_CATEGORY); }