Unfortunately there are many reasons why loading the FXML file may go wrong, so it is not possible to say exactly what your issue is here.
This question on StackOverflow details some of the issues others have encountered in the past:
http://stackoverflow.com/questions/17228487/javafx-location-is-not-set-error-message
Issues range from your
IDE not copying the file to the target directly, spelling errors in the FXML filename, not placing the FXML in the same compile output directory as your loading class, etc.
The basic issue is that Main.class.getResource("Test.fxml") is returning null because it can't find the related fxml class.
If your app is being built into a jar, run jar tvf on your jar and check that Text.fxml is in the same folder within the jar as your application/Main.class