@@ -0,0 +1,1554 @@
+package ru.matevosyan;%0A%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.core.Is.is;%0A%0A/**%0A * Created for testing DropAbuses.%0A * Created on 14.02.2017.%0A * @since 1.0%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class DropAbusesTest %7B%0A%0A    /**%0A     * Method whenAddFourWordAndTwoOfThisWordIsAbuseWordThanDeleteTwoAbuseWord.%0A     * check when input stream hold 4 words and 2 of words is abuse.%0A     * @throws IOException input or output exception.%0A     */%0A%0A    @Test%0A    public void whenAddFourWordAndTwoOfThisWordIsAbuseWordThanDeleteTwoAbuseWord() throws IOException %7B%0A%0A        //assign%0A        String%5B%5D abuses = %7B%22abuseWord1%22, %22abuseWord2%22%7D;%0A        String inputString = %22abuseWord1 goodWord1 abuseWord2 goodWord2%22;%0A%0A        //transforming inputString to array of bytes%0A        byte%5B%5D inputByte = inputString.getBytes();%0A%0A        try (InputStream inputStream = new ByteArrayInputStream(inputByte);%0A             OutputStream outputStream = new ByteArrayOutputStream()) %7B%0A%0A            //assign%0A            DropAbuses abusesWord = new DropAbuses();%0A%0A            //act%0A            abusesWord.dropAbuses(inputStream, outputStream, abuses);%0A%0A            //assertion%0A            assertThat(outputStream.toString(), is(%22goodWord1 goodWord2%22));%0A%0A        %7D catch (IOException ioe) %7B%0A            ioe.printStackTrace();%0A        %7D%0A%0A    %7D%0A%7D

add DropAbusesTest.java