View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.tools;
12  
13  import java.io.IOException;
14  import java.io.PrintStream;
15  
16  import org.junit.jupiter.api.Test;
17  import org.junit.jupiter.api.extension.ExtendWith;
18  import org.mockito.Mock;
19  import org.mockito.junit.jupiter.MockitoExtension;
20  import org.slf4j.Logger;
21  
22  /**
23   * The Class LogOutputStreamTest.
24   */
25  @ExtendWith(MockitoExtension.class)
26  class LogOutputStreamTest {
27  
28    /** The stream. */
29    PrintStream stream;
30  
31    /** The log. */
32    @Mock
33    Logger log;
34  
35    /**
36     * Logger test.
37     *
38     * @throws IOException Signals that an I/O exception has occurred.
39     */
40    @Test
41    void loggerTest() throws IOException {
42      stream = LogOutputStream.createPrintStream(log, 5);
43      stream.write('\u0001');
44    }
45  
46  }