I can't believe how hard it is to register cars in California. I've never had to experience that or SMOG/emission tests before. Got any pics of the car? How much have you invested in it? I always thought you couldn't pass the test with a motor not from your year/make.
Swaps are completely legal here. they are considered a direct replacement for your model vehicle, except the swap must be done properly and to specification.
1) they cannot be from a previous year of your car (engine cant be older than chasis, but in this case the b series was offered for the si versions so can go unnoticed)
2)Any and all equipment from the donor must be swapped over (ie all emissions+ wiring and ecu if your are convertining 0bd1 to 2)
3)It must be done Cleanly, meaning that you cant have wiring all over the place. It has to be exactly placed as the stock or how it was from the car it came from. If there are any relocations you have to provide a reason why and diagrams.
4)You have to pass the smog emissions and go through a defect check up (a test to see if everything is mechanically sound ). Depending on the inspector you might have to remove any aftermarket parts that increase emission, or remove fart cans if over the allowed decibel. And then replace accordingly to oem.
You can certainly pass, but its stringent on detail here. But there is a way around it. If you do a minor swap, you don't have to let them know. you just have to pass emissions. But if you are doing a bigger swap like a 2jzgte into 240sx, smog places will surely recognize you and so will officers if they check under the hood. Just because they notice it doesn't mean you will get into any trouble, it's still legal. But since it is a big swap, you are supposed to inform B.a.r. to have it approved. Most of the inspectors here are really cool about things if you are in good standing with them and will only car about emissions and its safe performance.
You can be fined for using the swap unapproved, but most officers wont do it. And if you say that you just had it installed and are testing it so that you can present it to B.A.R. they wont fine you at all...some even begin to converse and ask questions out of curiosity just because people rarely do it these days (big swaps like that anyways) But they do have a booklet with every engine that was never introduced in the U.S. meaning IE illegal engine booklet. They were all required to get these because of kids putting rb26detts and sr20dets in there cars. It has a picture of each engine and their engine code.