Copy package in Production DB to Test DB with dependencies?
In SQL Developer you can right-click on an object (table, package, procedure, etc) and there will be an option for 'Quick DDL'. Open that and you have options on what to do with the ddl, including saving to a file.  That's better than select/ctl-C/ctl-v, but there is still a better way since you know what you want.  

You can use expdb (DataPump export) to export the ddl for the selected objects.  That will create a binary .dmp file that is, essentially, all of the DDL you want.  You will need to read up on the options for limiting what gets exported or you very well could get the entire database, including data.  You then use impdp (DataPump import) to process that dmp file and create/load your objects.  Even when you limit the objects that get exported, you can specify whether or not to include the data. I leave it as an exercise for the student to study the relevant documentation at https://docs.oracle.com/database/121/SUTIL/GUID-501A9908-BCC5-434C-8853-9A6096766B5A.htm#SUTIL2877

Another method you might consider if you JUST want the DDL, without the DML to load tables, would be to write a script using the DBMS_METADATA.GET_DDL procedure, documented at https://docs.oracle.com/database/121/ARPLS/d_metada.htm#ARPLS66872

Now, you may say "Can't you just give me the script, getting this DDL is a distraction from my real job."  But you are just starting your career and time spent learning to read the docs, learning that these tools even exist, and learning how to use them is time well invested.  When I was just starting my career (as a COBOL programmer in 1981) I would take reference manuals home with me for bed-time reading.  It served me all, as within 3 years I was the lead tech on a project, directing the work of several programmers with more experience but less inate curiosity about how things really worked and about learning new things about the tools they thought they already knew.