public class ESNodeUTest {
@Test
public void buildFromNodeEntity() {
// Setup
Node node = mock(Node.class);
when(node.getId()).thenReturn(1l);
List<Tag> tags = new ArrayList<Tag>();
tags.add(new Tag("highway", "primary"));
when(node.getTags()).thenReturn(tags);
when(node.getLatitude()).thenReturn(1.0);
when(node.getLongitude()).thenReturn(2.0);
ESNode expected = ESNode.Builder.create().id(1l).location(1.0, 2.0)
.addTag("highway", "primary").build();
// Action