@Test
public void runShouldSetTheProvidersPaintCategory() {
@SuppressWarnings("serial")
class MyException extends RuntimeException {}
ICategory category = mock(ICategory.class);
IVisualProvider provider = mock(IVisualProvider.class);
doThrow(new MyException()).when(provider).setVisualCategory(category);
IAction action = create(category, provider);
thrown.expect(MyException.class);
action.run();