moved code to java + added Junit rules example + hamcrest