Examples from book Well Grounded Java Developer and related scala examples