import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.junit.Test;
import org.junit.Ignore;

public class SeriesTest {

    @Test
    public void slicesOfOneFromOne() {
        Series series = new Series("1");
        List<String> expected = Collections.singletonList("1");
        List<String> actual = series.slices(1);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void slicesOfOneFromTwo() {
        Series series = new Series("12");
        List<String> expected = Arrays.asList("1", "2");
        List<String> actual = series.slices(1);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void slicesOfTwo() {
        Series series = new Series("35");
        List<String> expected = Collections.singletonList("35");
        List<String> actual = series.slices(2);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void slicesOfTwoOverlap() {
        Series series = new Series("9142");
        List<String> expected = Arrays.asList("91", "14", "42");
        List<String> actual = series.slices(2);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void slicesIncludeDuplicates() {
        Series series = new Series("777777");
        List<String> expected = Arrays.asList(
                "777",
                "777",
                "777",
                "777"
        );
        List<String> actual = series.slices(3);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void slicesOfLongSeries() {
        Series series = new Series("918493904243");
        List<String> expected = Arrays.asList(
                "91849",
                "18493",
                "84939",
                "49390",
                "93904",
                "39042",
                "90424",
                "04243"
        );
        List<String> actual = series.slices(5);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void sliceLengthIsToolarge() {
        Series series = new Series("12345");

        IllegalArgumentException expected =
            assertThrows(
                IllegalArgumentException.class,
                () -> series.slices(6));

        assertThat(expected)
            .hasMessage("Slice size is too big.");
    }

    @Ignore("Remove to run test")
    @Test
    public void sliceLengthZero() {
        Series series = new Series("12345");

        IllegalArgumentException expected =
            assertThrows(
                IllegalArgumentException.class,
                () -> series.slices(0));

        assertThat(expected)
            .hasMessage("Slice size is too small.");
    }

    @Ignore("Remove to run test")
    @Test
    public void sliceLengthNegative() {
        Series series = new Series("123");

        IllegalArgumentException expected =
            assertThrows(
                IllegalArgumentException.class,
                () -> series.slices(-1));

        assertThat(expected)
            .hasMessage("Slice size is too small.");
    }

    @Ignore("Remove to run test")
    @Test
    public void emptySeries() {
        Series series = new Series("");

        IllegalArgumentException expected =
            assertThrows(
                IllegalArgumentException.class,
                () -> series.slices(1));

        assertThat(expected)
            .hasMessage("Slice size is too big.");
    }

}

@@ -15,46 +15,33 @@
 org.
-assertj.core.api
+junit
 .Assert
-ions
 .assert
-That
+Equals
 ;%0Aim
@@ -60,65 +60,35 @@
 org.
-junit.Assert.assertEquals;%0Aimport static org.junit
+assertj.core.api
 .Assert
+ions
 .ass
@@ -92,20 +92,33 @@
 assertTh
-rows
+atExceptionOfType
 ;%0A%0Aimpor
@@ -2367,86 +2367,34 @@
     
-IllegalArgumentException expected =%0A            assertThrows(%0A                
+assertThatExceptionOfType(
 Ille
@@ -2411,33 +2411,33 @@
 tException.class
-,
+)
 %0A               
@@ -2429,32 +2429,44 @@
                 
+.isThrownBy(
 () -%3E series.sli
@@ -2476,40 +2476,15 @@
 (6))
-;%0A
 %0A      
-  assertThat(expected)%0A
     
@@ -2481,38 +2481,37 @@
                 
-  .has
+.with
 Message(%22Slice s
@@ -2674,86 +2674,34 @@
     
-IllegalArgumentException expected =%0A            assertThrows(%0A                
+assertThatExceptionOfType(
 Ille
@@ -2718,33 +2718,33 @@
 tException.class
-,
+)
 %0A               
@@ -2736,32 +2736,44 @@
                 
+.isThrownBy(
 () -%3E series.sli
@@ -2783,40 +2783,15 @@
 (0))
-;%0A
 %0A      
-  assertThat(expected)%0A
     
@@ -2788,38 +2788,37 @@
                 
-  .has
+.with
 Message(%22Slice s
@@ -2985,86 +2985,34 @@
     
-IllegalArgumentException expected =%0A            assertThrows(%0A                
+assertThatExceptionOfType(
 Ille
@@ -3029,33 +3029,33 @@
 tException.class
-,
+)
 %0A               
@@ -3047,32 +3047,44 @@
                 
+.isThrownBy(
 () -%3E series.sli
@@ -3095,40 +3095,15 @@
 -1))
-;%0A
 %0A      
-  assertThat(expected)%0A
     
@@ -3100,38 +3100,37 @@
                 
-  .has
+.with
 Message(%22Slice s
@@ -3286,86 +3286,34 @@
     
-IllegalArgumentException expected =%0A            assertThrows(%0A                
+assertThatExceptionOfType(
 Ille
@@ -3338,17 +3338,17 @@
 on.class
-,
+)
 %0A       
@@ -3356,16 +3356,28 @@
         
+.isThrownBy(
 () -%3E se
@@ -3395,40 +3395,15 @@
 (1))
-;%0A
 %0A      
-  assertThat(expected)%0A
     
@@ -3412,14 +3412,13 @@
     
-  .has
+.with
 Mess

Convert exception assertions to AssertJ in SeriestTest (#2172)