MBUtil { public static String getBBCodeQuoteBody( HttpServletRequest httpServletRequest, MBMessage parentMessage) { String parentAuthor = _getParentAuthor( parentMessage, httpServletRequest); StringBundler sb = new StringBundler(5); sb.append("[quote="); sb.append( StringUtil.replace( parentAuthor, new String[] {"[", "]", "(", ")"}, new String[] {"&#91;", "&#93;", "&#40;", "&#41;"})); sb.append("]\n"); sb.append(parentMessage.getBody(false)); sb.append("[/quote]\n\n\n"); return sb.toString(); }  static String getBBCodeQuoteBody(
		HttpServletRequest httpServletRequest, MBMessage parentMessage); static String getBBCodeSplitThreadBody(
		HttpServletRequest httpServletRequest); static long getCategoryId(
		HttpServletRequest httpServletRequest, MBCategory category); static long getCategoryId(
		HttpServletRequest httpServletRequest, MBMessage message); static String getEditorName(String messageFormat); static String getHtmlQuoteBody(
		HttpServletRequest httpServletRequest, MBMessage parentMessage); static String getHtmlSplitThreadBody(
		HttpServletRequest httpServletRequest); static String getMBMessageURL(
		long messageId, HttpServletRequest httpServletRequest); static String getMBMessageURL(
		long messageId, RenderResponse renderResponse); static String getMBMessageURL(
		long messageId, String layoutURL, RenderResponse renderResponse); static String[] getThreadPriority(
		MBGroupServiceSettings mbGroupServiceSettings, String languageId,
		double value); static boolean isViewableMessage(
			ThemeDisplay themeDisplay, MBMessage message); static boolean isViewableMessage(
			ThemeDisplay themeDisplay, MBMessage message,
			MBMessage parentMessage);  }
@Test public void testGetBBCodeQuoteBodyReturnsQuotedContent() { MBMessage mbMessage = Mockito.mock(MBMessage.class); Mockito.when( mbMessage.getBody(Mockito.anyBoolean()) ).thenReturn( "CONTENT" ); Assert.assertEquals( "[quote=USER&#91;&#93;&#40;&#41;]\nCONTENT[/quote]\n\n\n", MBUtil.getBBCodeQuoteBody( Mockito.mock(HttpServletRequest.class), mbMessage)); }