The teens had exchanged videos of previous terror attacks and tested homemade explosives.