Fix NPE in ExtensionsTests