Add junit tests
Code format