Test loadFromBuffer