@Test void getDouble() { String attrName = "attr"; Double value = 0d; when(entity.getDouble(attrName)).thenReturn(value); assertEquals(lazyEntity.getDouble(attrName), value); assertEquals(lazyEntity.getDouble(attrName), value); verify(dataService, times(1)).findOneById(ENTITY_NAME, id); }
@Override public Double getDouble(String attributeName) { return getLazyLoadedEntity().getDouble(attributeName); }
LazyEntity implements Entity { @Override public Double getDouble(String attributeName) { return getLazyLoadedEntity().getDouble(attributeName); } }
LazyEntity implements Entity { @Override public Double getDouble(String attributeName) { return getLazyLoadedEntity().getDouble(attributeName); } LazyEntity(EntityType entityType, DataService dataService, Object id); }
LazyEntity implements Entity { @Override public Double getDouble(String attributeName) { return getLazyLoadedEntity().getDouble(attributeName); } LazyEntity(EntityType entityType, DataService dataService, Object id); @Override Object getIdValue(); @Override void setIdValue(Object id); EntityType getEntityType(); @Override Iterable<String> getAttributeNames(); @Override Object getLabelValue(); @Override Object get(String attributeName); @Override String getString(String attributeName); @Override Integer getInt(String attributeName); @Override Long getLong(String attributeName); @Override Boolean getBoolean(String attributeName); @Override Double getDouble(String attributeName); @Override Instant getInstant(String attributeName); @Override LocalDate getLocalDate(String attributeName); @Override Entity getEntity(String attributeName); @Override E getEntity(String attributeName, Class<E> clazz); @Override Iterable<Entity> getEntities(String attributeName); @Override Iterable<E> getEntities(String attributeName, Class<E> clazz); @Override void set(String attributeName, Object value); @Override void set(Entity values); @Override String toString(); }
LazyEntity implements Entity { @Override public Double getDouble(String attributeName) { return getLazyLoadedEntity().getDouble(attributeName); } LazyEntity(EntityType entityType, DataService dataService, Object id); @Override Object getIdValue(); @Override void setIdValue(Object id); EntityType getEntityType(); @Override Iterable<String> getAttributeNames(); @Override Object getLabelValue(); @Override Object get(String attributeName); @Override String getString(String attributeName); @Override Integer getInt(String attributeName); @Override Long getLong(String attributeName); @Override Boolean getBoolean(String attributeName); @Override Double getDouble(String attributeName); @Override Instant getInstant(String attributeName); @Override LocalDate getLocalDate(String attributeName); @Override Entity getEntity(String attributeName); @Override E getEntity(String attributeName, Class<E> clazz); @Override Iterable<Entity> getEntities(String attributeName); @Override Iterable<E> getEntities(String attributeName, Class<E> clazz); @Override void set(String attributeName, Object value); @Override void set(Entity values); @Override String toString();  }