added JavaDoc to toString()
added test for toString