1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.commons.compress.compressors;
21
22 import static org.junit.jupiter.api.Assertions.assertThrows;
23
24 import java.io.ByteArrayInputStream;
25 import java.io.ByteArrayOutputStream;
26
27 import org.apache.commons.compress.compressors.TestCompressorStreamProvider.InvocationConfirmationException;
28 import org.apache.commons.lang3.ArrayUtils;
29 import org.junit.jupiter.api.Test;
30
31 public class CompressorServiceLoaderTest {
32
33 @Test
34 public void testInputStream() {
35 assertThrows(InvocationConfirmationException.class,
36 () -> new CompressorStreamFactory().createCompressorInputStream("TestInput1", new ByteArrayInputStream(ArrayUtils.EMPTY_BYTE_ARRAY)));
37 }
38
39 @Test
40 public void testOutputStream() {
41 assertThrows(InvocationConfirmationException.class,
42 () -> new CompressorStreamFactory().createCompressorOutputStream("TestOutput1", new ByteArrayOutputStream()));
43 }
44
45 }