Java samples & test