public static <K, V> Map<K, V> subtractMap(Map<? extends K, ? extends V> minuend, Map<? extends K, ? extends V> subtrahend) {
        return minuend.entrySet().stream()
                .filter(entry -> !subtrahend.containsKey(entry.getKey()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    }
@Test
    public void testSubtractMapDoesntRemoveAnythingWhenEmptyMap() {
        Map<String, String> mainMap = new HashMap<>();
        mainMap.put("one", "1");
        mainMap.put("two", "2");
        mainMap.put("three", "3");
        Map<String, String> secondaryMap = new HashMap<>();

        Map<String, String> newMap = subtractMap(mainMap, secondaryMap);

        assertEquals(3, newMap.size());
        assertEquals("1", newMap.get("one"));
        assertEquals("2", newMap.get("two"));
        assertEquals("3", newMap.get("three"));
        assertNotSame(newMap, mainMap);
    }