Point should have accessor for Tags and Fields
Currently Point class has only package-private accessors for getTags() and getFields(). Thus, it makes it very hard to test whether my data from POJO has been properly converted or used at all. The only option is to use lineProtocol() that returns a String in lineProtocol format, which I would need to parse to extract values to compare to what I have provided.
This was intentionally to keep Point immutable.
@majst01 You actually do modify the Point from within BatchPoints class. Nevertheless, you can return Collections.unmodifableMaps to kepp the data still unmutable as an example. And without the access to getters, it is impossible to test the conversion between POJOs and Point using very helpful method from Point class.
Fully agree with @RusmanCool !
While writing my tests I was forced to use reflection to access Point's details.
Package-private getters are not the only way to keep your class immutable (see for example Bloch's 'Effective Java', item 17 & 50)