public static <T extends Throwable> void checkContainsKey(final Map<?, ?> map, final Object key, final Supplier<T> exceptionSupplierIfUnexpected) throws T {
        if (!map.containsKey(key)) {
            throw exceptionSupplierIfUnexpected.get();
        }
    }
@Test
    void assertCheckContainsKeyToThrowsException() {
        assertThrows(SQLException.class, () -> ShardingSpherePreconditions.checkContainsKey(Collections.singletonMap("foo", "value"), "bar", SQLException::new));
    }