### Question:
KinesisFirehoseRecorder extends AbstractKinesisRecorder { @Override public void saveRecord(byte[] data, String streamName) { if (streamName == null || !STREAM_NAME_PATTERN.matcher(streamName).matches()) { throw new IllegalArgumentException("Invalid stream name: " + streamName); } if (data == null || data.length == 0 || data.length > MAX_RECORD_SIZE_BYTES) { throw new IllegalArgumentException("Invalid data size."); } super.saveRecord(data, streamName); } KinesisFirehoseRecorder(File directory, Regions region,
            AWSCredentialsProvider credentialsProvider);  KinesisFirehoseRecorder(File directory, Regions region,
            AWSCredentialsProvider credentialsProvider, KinesisRecorderConfig config);   KinesisFirehoseRecorder(FirehoseRecordSender sender, FileRecordStore recordStore,
            KinesisRecorderConfig config); @Override void saveRecord(byte[] data, String streamName);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testNullRecord() throws IOException { recorder.saveRecord((byte[]) null, "stream"); }
@Test(expected = IllegalArgumentException.class) public void testEmptyData() throws IOException { byte[] data = new byte[0]; recorder.saveRecord(data, "stream"); }
@Test(expected = IllegalArgumentException.class) public void testEmptyStream() throws IOException { recorder.saveRecord("valid".getBytes(StringUtils.UTF8), ""); }
@Test(expected = IllegalArgumentException.class) public void testNullStream() throws IOException { recorder.saveRecord("valid".getBytes(StringUtils.UTF8), null); }