public class UserAgentMorphlineTest extends AbstractMorphlineTest {
@Test
public void testRawAPI() throws Exception {
String userAgentStr = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3";
Client client = new Parser().parse(userAgentStr);
assertEquals("Mobile Safari", client.userAgent.family);
assertEquals("5", client.userAgent.major);
assertEquals("1", client.userAgent.minor);
assertNull(client.userAgent.patch);