added JavaDoc for fromString
added test for fromString