protected MessageOutput launchOutput(Output output, Stream stream) throws Exception {
        final MessageOutput messageOutput = messageOutputFactory.fromStreamOutput(output, stream,
                new org.graylog2.plugin.configuration.Configuration(output.getConfiguration()));

        if (messageOutput == null) {
            throw new IllegalArgumentException("Failed to instantiate MessageOutput from Output: " + output);
        }

        messageOutput.initialize();

        return messageOutput;
    }
@Test(expected = IllegalArgumentException.class)
    public void testThrowExceptionForUnknownOutputType() throws Exception {
        registry.launchOutput(output, null);
    }