### Question:
LazyProperties implements Properties { @Override public DataSetValueModel getDataSetProperty(String propertyName) { if(!dataSetProperties.containsKey(propertyName)) { throw new RuntimeException("No such dataSet property '"+describeProperty(propertyName)+"'"); } DataSetPropertyValueModel property = dataSetProperties.get(propertyName); if (property == null) { dataSetProperties.put(propertyName, supply.createDataSetProperty(propertyName)); property = dataSetProperties.get(propertyName); } return property; } LazyProperties(Class<?> beanClass, Set<String> propertyNames, Set<String> dataSetPropertyNames, 
			PropertyWithDependencySupply supply); @SuppressWarnings("unchecked") @Override ValueModel<T> getReadOnlyProperty(String propertyName); @SuppressWarnings("unchecked") @Override ValueModel<T> getReadWriteProperty(String propertyName); @Override Class<?> getPropertyType(String propertyName); @Override DataSetValueModel getDataSetProperty(String propertyName);  }### Answer:
@Test public void givenGetDatSetPropertyOnce_whenGetDataSetPropertyAgain_thenReturnSameInstance() { PropertyWithDependencySupply supply = mock(PropertyWithDependencySupply.class); when(supply.createDataSetProperty(PROPERTY_NAME)).thenReturn(mock(DataSetPropertyValueModel.class)); LazyProperties lazyProperties = createLazyProperties(supply); DataSetValueModel dataSetProperty = lazyProperties.getDataSetProperty(PROPERTY_NAME); DataSetValueModel cachedDataSetProperty = lazyProperties.getDataSetProperty(PROPERTY_NAME); assertThat(cachedDataSetProperty, sameInstance(dataSetProperty)); }