private static String parseArchitecture(P4Info p4info) {
        if (p4info.hasPkgInfo()) {
            return p4info.getPkgInfo().getArch();
        }
        return null;
    }
@Test
    public void testParseArchitecture() throws Exception {
        // Generate two PiPipelineModels from the same p4Info file
        PiPipelineModel model = P4InfoParser.parse(p4InfoUrl);
        PiPipelineModel sameAsModel = P4InfoParser.parse(p4InfoUrl);

        PiPipelineModel model3 = P4InfoParser.parse(p4InfoUrl2);

        String architecture1 = model.architecture().orElse(null);
        String architecture2 = sameAsModel.architecture().orElse(null);

        assertThat("null value is returned if `arch` not present in P4Info",
                   architecture1,
                   is(nullValue()));
        assertThat("null value is returned if `arch` not present in P4Info",
                   architecture2,
                   is(nullValue()));

        String architecture3 = model3.architecture().orElse(null);
        assertThat("test that `arch` field is correctly parsed",
                   architecture3,
                   is("v1model"));
    }