- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- chunkSize = 256;
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testIllegalSize() throws Exception {
- new ChunkedFramingMechanismEncoder(10);
+ @Test
+ void testIllegalSize() {
+ assertThrows(IllegalArgumentException.class, () -> new ChunkedFramingMechanismEncoder(10));