To test your application you need to install it on a Java Card virtual machine. This can either be on a real smartcard or in an emulator (such as the ones in the JCDK). When you have it installed you can then send APDU commands to exercise the applet. From memory, there is an example of how to use the CREF simulator in the JCDK Developer Guide that is a part of the package.
If you have a real card, you can use something like GPShell to load and install your applet and to send commands to it. I have also found it is useful to have a host application written in Java (using jUnit) to test specific commands.