testLineageOpenClose() added

Also javadoc was fixed and code was reformated