@Test
public void test_getFormattedText_with_pattern() throws Exception {

    String value = "Lorem Ipsum"; //$NON-NLS-1$
    assertThat(TagW.getFormattedText(value, "")).isEqualTo(value); //$NON-NLS-1$
    assertThat(TagW.getFormattedText(value, "$V")).isEqualTo(value); //$NON-NLS-1$
    assertThat(TagW.getFormattedText(value, "$V  ")).isEqualTo(value); //$NON-NLS-1$
    assertThat(TagW.getFormattedText(value, "  $V")).isEqualTo(value); //$NON-NLS-1$
    assertThat(TagW.getFormattedText(value, "test: $V")).isEqualTo("test: " + value); //$NON-NLS-1$ //$NON-NLS-2$
    assertThat(TagW.getFormattedText(value, "test: $V and $V")).isEqualTo("test: " + value + " and $V"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertThat(TagW.getFormattedText(STRING_ARRAY, "test: $V and $V plus $V")) //$NON-NLS-1$
        .isEqualTo("test: " + STRING_ARRAY[0] + "\\" + STRING_ARRAY[1] + " and $V plus $V"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}