In this training module you get a walkthrough to creating a Java application with in-app purchasing features for Series 40 phones, setting up the Series 40 emulator, and using its features to effectively test purchasing in your app.
Download the source code used in this module here.