public class BbCodeNestingValidatorTest {
private BbCodeNestingValidator instance;
@BeforeMethod
public void initMocks() throws NoSuchFieldException {
BbCodeNesting annotation = mock(BbCodeNesting.class);
// limit nesting to 2
when(annotation.maxNestingValue()).thenReturn(2);
instance = new BbCodeNestingValidator();
instance.initialize(annotation);
}