### Question:
RelationBuilder extends GeometryBuilder<Relation> { public Geometry build(Relation entity) { Map<String, String> tags = entity.getTags(); if (!"multipolygon".equals(tags.get("type"))) { return null; } List<LineString> members = entity.getMembers() .stream() .map(member -> { try { return referenceCache.get(member.getRef()); } catch (CacheException e) { return null; } }) .filter(reference -> reference != null) .map(reference -> { try { return coordinateCache.getAll(reference).stream() .filter(point -> point != null) .toArray(Coordinate[]::new); } catch (CacheException e) { return null; } }) .filter(t -> t != null) .map(t -> geometryFactory.createLineString(t)) .collect(Collectors.toList()); if (members.isEmpty()) { return null; } try { Polygonizer polygonizer = new Polygonizer(true); polygonizer.add(members); return polygonizer.getGeometry(); } catch (Exception ex) { return null; } } @Inject  RelationBuilder(GeometryFactory geometryFactory, Cache<Long, Coordinate> coordinateCache,
      Cache<Long, List<Long>> referenceCache); Geometry build(Relation entity);  }### Answer:
@Test public void build() { assertNull(RELATION_BUILDER.build(RELATION_0)); assertNull(RELATION_BUILDER.build(RELATION_1)); assertTrue(RELATION_BUILDER.build(RELATION_2) instanceof Polygon); assertTrue(RELATION_BUILDER.build(RELATION_3) instanceof MultiPolygon); assertTrue(RELATION_BUILDER.build(RELATION_4) instanceof MultiPolygon); }