public class ESWayUTest {
@Test
public void buildFromWayEntity() {
// Setup
Way way = mock(Way.class);
when(way.getId()).thenReturn(1l);
List<Tag> tags = new ArrayList<Tag>();
tags.add(new Tag("highway", "primary"));
when(way.getTags()).thenReturn(tags);
List<WayNode> wayNodes = new ArrayList<WayNode>();
wayNodes.add(new WayNode(1l));
wayNodes.add(new WayNode(2l));
when(way.getWayNodes()).thenReturn(wayNodes);
ESShapeBuilder builder = new ESShapeBuilder();
builder.addLocation(1.0, 2.0).addLocation(2.0, 3.0);
ESWay expected = ESWay.Builder.create().id(1l)