In the first function getTotalPages, asm is initialised to null. So, it should produce NPE (null pointer exception). To create an object of a java class, in this context, it is either supposed to be referred using @reference or get initialised using a constructor. I am not saying there cannot be oth...