public void InstantiatePrefab() { var transform = new GameObject("transform").transform; var prefab = new GameObject("prefab").AddComponent <MockComponent>(); var magazine = new Magazine { projectileStorage = transform, projectilePrefab = prefab.gameObject }; var projectile = magazine.GetOrMakeProjectile(); CollectionAssert.AreEqual( new bool[] { true, true }, new bool[] { projectile.Value != prefab.gameObject, projectile.Value.TryGetComponent(out MockComponent _), }