### Question:
OSMElement { public void setTags( Map<String, String> newTags ) { properties.clear(); if (newTags != null) for (Entry<String, String> e : newTags.entrySet()) { setTag(e.getKey(), e.getValue()); } } protected  OSMElement( long id, int type ); long getId(); void setTags( Map<String, String> newTags ); boolean hasTags(); String getTag( String name ); @SuppressWarnings("unchecked") T getTag( String key, T defaultValue ); void setTag( String name, Object value ); boolean hasTag( String key, Object value ); boolean hasTag( String key, String... values ); final boolean hasTag( String key, Set<String> values ); boolean hasTag( List<String> keyList, Set<String> values ); String getFirstPriorityTag( List<String> restrictions ); void removeTag( String name ); void clearTags(); int getType(); boolean isType( int type ); @Override String toString(); static final int NODE; static final int WAY; static final int RELATION; }### Answer:
@Test public void testSetTags() { OSMElement instance = new OSMWay(1); Map<String, String> map = new HashMap<String, String>(); map.put("test", "xy"); instance.setTags(map); assertTrue(instance.hasTag("test", "xy")); instance.setTags(null); assertFalse(instance.hasTag("test", "xy")); }