Sdk () { return new MockSdk(myName, myHomePath, myVersionString, new MultiMap<>(myRoots), mySdkType.get()) { private final UserDataHolder udh = new UserDataHolderBase(); @NotNull @Override public SdkModificator getSdkModificator() { return this; } @Nullable @Override public <T> T getUserData(@NotNull Key<T> key) { return udh.getUserData(key); } @Override public <T> void putUserData(@NotNull Key<T> key, @Nullable T value) { udh.putUserData(key, value); } }; }