Transform MSDN example to JOA