Server: Add close method
Move to jUnit 4, split tests