@Test(expected = UnsupportedProtocolException.class)
public void shouldThrowUnsuportedProtocolExceptionIllegalProtocol() throws Exception {

    when(socket.getInputStream())
            .thenReturn(new ByteArrayInputStream("GET / MALF/1.0\r\nHeader1: someValue\r\n\r\n".getBytes()));
    factory.createFromSocket(socket);
}