public Optional<RawFlag> resolve(FetchVector fetchVector) {
        return rules.stream()
                .filter(rule -> rule.match(defaultFetchVector.with(fetchVector)))
                .findFirst()
                .flatMap(Rule::getValueToApply);
    }
@Test
    void testResolve() {
        // Second rule matches with the default zone matching
        verify(Optional.of("false"), vector);

        // First rule matches only if both conditions match
        verify(Optional.of("false"), vector
                .with(Dimension.HOSTNAME, "host1")
                .with(Dimension.INSTANCE_ID, "app2"));
        verify(Optional.of("true"), vector
                .with(Dimension.HOSTNAME, "host1")
                .with(Dimension.INSTANCE_ID, "app3"));

        // Verify unsetting a dimension with null works.
        verify(Optional.of("true"), vector
                .with(Dimension.HOSTNAME, "host1")
                .with(Dimension.INSTANCE_ID, "app3")
                .with(Dimension.INSTANCE_ID, null));

        // No rules apply if zone is overridden to an unknown zone
        verify(Optional.empty(), vector.with(Dimension.ZONE_ID, "unknown zone"));
    }