instantiation in java is working. wrote a simple test