java port of domain model, domain tests and infrastructure