@Override
    public SecretKey getKey(String identityHint, String identity, Socket socket) {
        try {
            return (SecretKey) mDelegate.getClass()
                    .getMethod("getKey", String.class, String.class, Socket.class)
                    .invoke(mDelegate, identityHint, identity, socket);
        } catch (Exception e) {
            throw new RuntimeException("Failed to invoke getKey", e);
        }
    }
Gets an instance of {@code DuckTypedPSKKeyManager} which delegates all invocations of methods
of the {@link PSKKeyManager} interface to the same methods of the provided object.

@throws NoSuchMethodException if {@code obj} does not implement a method of the
        {@code PSKKeyManager} interface.
common/src/main/java/org/conscrypt/DuckTypedPSKKeyManager.java