public boolean isMatch(Map<String, Pattern> patterns) {
        if (!patterns.isEmpty()) {
            return matchPatterns(patterns);
        }
        // Empty pattern is still considered as a match.
        return true;
    }
@Test
    public void testIsMatchWithNullValueFail() throws UnknownHostException {
        Uuid uuid = Uuid.randomUuid();
        ClientMetricsInstanceMetadata instanceMetadata = new ClientMetricsInstanceMetadata(uuid,
            ClientMetricsTestUtils.requestContextWithNullClientInfo());

        assertFalse(instanceMetadata.isMatch(Collections.singletonMap(ClientMetricsConfigs.CLIENT_SOFTWARE_NAME,
            Pattern.compile(".*"))));
        assertFalse(instanceMetadata.isMatch(Collections.singletonMap(ClientMetricsConfigs.CLIENT_SOFTWARE_VERSION,
            Pattern.compile(".*"))));
    }