Very simple example of singleton and proxy pattern in java