diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index 41d79b827..c2008ad5e 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -797,11 +797,15 @@ public void testAddFieldsFromPOJOWithPublicAttributes() { @Test public void testAddFieldsFromPOJOWithDefaultAnnotation() { PojoWithDefaultAnnotation pojo = new PojoWithDefaultAnnotation(); + PojoWithDefaultAnnotation pojo1 = new PojoWithDefaultAnnotation(); pojo.setAuthor(""); pojo.setId("1"); Point p = Point.measurementByPOJO(pojo.getClass()).addFieldsFromPOJO(pojo).build(); - Assertions.assertEquals(pojo.getAuthor(),p.getFields().get("author")); - Assertions.assertEquals(pojo.getId(),p.getFields().get("id")); + //Completely separate pojo with different reference to compare against + pojo1.setAuthor(""); + pojo1.setId("1"); + Assertions.assertEquals(pojo1.getAuthor(),p.getFields().get("author")); + Assertions.assertEquals(pojo1.getId(),p.getFields().get("id")); } @Test