bson/src/main/org/bson/Document.java
public <T> T getEmbedded(final List<?> keys, final T defaultValue) {
        notNull("keys", keys);
        isTrue("keys", !keys.isEmpty());
        notNull("defaultValue", defaultValue);
        return getEmbeddedValue(keys, null, defaultValue);
    }
public <T> T getEmbedded(final List<?> keys, final T defaultValue) {
        notNull("keys", keys);
        isTrue("keys", !keys.isEmpty());
        notNull("defaultValue", defaultValue);
        return getEmbeddedValue(keys, null, defaultValue);
    }
Gets the value in an embedded document, casting it to the given {@code Class<T>} or returning the default value if null.
The list of keys represents a path to the embedded value, drilling down into an embedded document for each key.
This is useful to avoid having casts in client code, though the effect is the same.

The generic type of the keys list is {@code ?} to be consistent with the corresponding {@code get} methods, but in practice
the actual type of the argument should be {@code List<String>}. So to get the embedded value of a key list that is of type String,
you would write {@code String name = doc.getEmbedded(List.of("employee", "manager", "name"), "John Smith")} instead of
{@code String name = doc.get("employee", Document.class).get("manager", Document.class).get("name", "John Smith") }.

@param keys  the list of keys
@param defaultValue what to return if the value is null
@param <T>   the type of the class
@return the value of the given key, or null if the instance does not contain this key.
@throws ClassCastException if the value of the given key is not of type T
@since 3.10