@Test
 public void completeMetaInfo() {
   String text =
       String.format(
           "this is a test text with two inline meta-datas: {@%s meta \t text} and {@%s}",
           META_KEY, META_KEY);
   myMockery.checking(
       new Expectations() {
         {
           one(myProcessor).process("meta \t text");
           one(myProcessor).process("");
         }
       });
   myBuilder.setText(text);
 }
  @Before
  public void setUp() {
    myBuilder = new RichTextControlBuilder();
    myMockery =
        new JUnit4Mockery() {
          {
            setImposteriser(ClassImposteriser.INSTANCE);
          }
        };

    myProcessor = myMockery.mock(RichTextControlBuilder.RichTextProcessor.class);
    myMockery.checking(
        new Expectations() {
          {
            allowing(myProcessor).getKey();
            will(returnValue(META_KEY));
          }
        });
    myBuilder.registerProcessor(myProcessor);
  }
 @Test(expected = IllegalArgumentException.class)
 public void noProcessorForMetaKey() {
   myBuilder.setText("{@key data}");
 }
 @Test(expected = IllegalArgumentException.class)
 public void invalidMetaKeyDefinition() {
   myBuilder.setText("test {@ invalid-key data}");
 }