Fixed return for newFromPatch method
Updated test imports