GeneratedAttributesUtil { public static Map<String, Object> cleanup(final Map<String, Object> _attrs) { final Map<String, Object> attrs = new HashMap<>(_attrs); attrs.replace(GeneratedAttributesView.GENERATED_ATTRIBUTE_NAME, null); return attrs; } private  GeneratedAttributesUtil(); static Map<String, Object> cleanup(final Map<String, Object> _attrs);  }
@Test public void cleanup() { Map<String, Object> originalAttributeMap = new HashMap<String, Object>() {{ put(GeneratedAttributesView.GENERATED_ATTRIBUTE_NAME, true); put("customAttribute", "value"); }}; Map<String, Object> result = GeneratedAttributesUtil.cleanup(originalAttributeMap); assertNull(result.get(GeneratedAttributesView.GENERATED_ATTRIBUTE_NAME)); assertNotNull(result.get("customAttribute")); }