package com.fewlaps.mentiondetector;

import org.junit.Before;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class RemovePunctuationMarksTest {

    RemovePunctuationMarks removePunctuationMarks;

    @Before
    public void setup() {
        removePunctuationMarks = new RemovePunctuationMarks();
    }

    @Test
    public void shouldRemoveExclamationMarks() throws InterruptedException {
        String textWithPunctuationMarks = "hello!!!!";

        String textWithoutPunctuationMarks = removePunctuationMarks.removePunctuationMarks(textWithPunctuationMarks);

        assertThat(textWithoutPunctuationMarks).doesNotContain("!");
    }

    @Test
    public void shouldRemoveQuestionMarks() throws InterruptedException {
        String textWithPunctuationMarks = "hello????";

        String textWithoutPunctuationMarks = removePunctuationMarks.removePunctuationMarks(textWithPunctuationMarks);

        assertThat(textWithoutPunctuationMarks).doesNotContain("?");
    }

    @Test
    public void shouldRemoveReversedExclamationMarks() throws InterruptedException {
        String textWithPunctuationMarks = "hello";

        String textWithoutPunctuationMarks = removePunctuationMarks.removePunctuationMarks(textWithPunctuationMarks);

        assertThat(textWithoutPunctuationMarks).doesNotContain("");
    }

    @Test
    public void shouldRemoveReversedQuestionMarks() throws InterruptedException {
        String textWithPunctuationMarks = "hello";

        String textWithoutPunctuationMarks = removePunctuationMarks.removePunctuationMarks(textWithPunctuationMarks);

        assertThat(textWithoutPunctuationMarks).doesNotContain("");
    }
}

@@ -1150,35 +1150,39 @@
 onMarks = %22hello
+%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD
 %22;%0A
-
 %0A        String 
@@ -1341,32 +1341,33 @@
 doesNotContain(%22
+%EF%BF%BD
 %22);%0A    %7D%0A%0A    @
@@ -1501,16 +1501,19 @@
 = %22hello
+%EF%BF%BD%EF%BF%BD%EF%BF%BD
 %22;%0A%0A    
@@ -1619,32 +1619,32 @@
 tuationMarks);%0A%0A
-
         assertTh
@@ -1691,16 +1691,17 @@
 ontain(%22
+%EF%BF%BD
 %22);%0A    

Convert the file to UTF-8