### Question:
BbUserPreprocessor extends TextProcessorAdapter { @Override public CharSequence process(CharSequence source) { String notProcessedSource = source.toString(); return userService.processUserBbCodesInPost(notProcessedSource); } BbUserPreprocessor(UserService userService); @Override CharSequence process(CharSequence source);  }### Answer:
@Test public void processShouldReplaceUserCodesWithProfileLinks() { String source = "source"; when(userService.processUserBbCodesInPost(source)).thenReturn("my string"); String actualResult = userPreprocessor.process(source); assertEquals(actualResult, "my string"); }