Well, God created satan, also knowing what he was going to do, didn’t He?
I have not found the notion that Lucifer was created with the foreknowledge of the Heavenly Father that Lucifer was going to rebel anywhere in the Bible. He did however create him with the 'freedom' to choose. Just as that same 'freedom' is given to the children. Real LOVE cannot be commanded or dictated and that is what all this is about to ascertain, 'judge' whether all individuals have a natural affection for the Heavenly Father. Lucifer flopped and has already been judged and received the death sentence.