use of org.codice.alliance.video.stream.mpegts.filename.TempFileGenerator in project alliance by codice.
the class PacketBufferTest method setup.
@Before
public void setup() throws IOException {
TempFileGenerator tempFileGenerator = mock(TempFileGenerator.class);
when(tempFileGenerator.generate()).thenReturn(new File("x"));
packetBuffer = new PacketBuffer();
outputStream = mock(OutputStream.class);
packetBuffer.setOutputStreamFactory((file, append) -> outputStream);
packetBuffer.setTempFileGenerator(tempFileGenerator);
rolloverCondition = mock(RolloverCondition.class);
when(rolloverCondition.isRolloverReady(any())).thenReturn(true);
tempFile = null;
os = new ByteArrayOutputStream();
}
Aggregations