@Test
    void testGetModelConfig() {
        VespaModel vespaModel = new VespaModelCreatorWithFilePkg("src/test/cfg/admin/adminconfig20").create();
        ModelConfig config = vespaModel.getConfig(ModelConfig.class, "");
        assertEquals(config.hosts().size(), 1);
        ModelConfig.Hosts localhost = config.hosts(0); //Actually set to hostname.
        int numLogservers = 0;
        int numSlobroks = 0;
        for (ModelConfig.Hosts.Services service : localhost.services()) {
            if ("logserver".equals(service.type())) {
                numLogservers++;
            }
            if ("slobrok".equals(service.type())) {
                numSlobroks++;
            }
        }
        assertEquals(1, numLogservers);
        assertEquals(2, numSlobroks);
    }
Get the config via ConfigInstance based API, by getting whole config
config-model/src/test/java/com/yahoo/vespa/model/test/ModelConfigProviderTest.java