### Question:
BuildContextHolder { public String getValue(final String key) { String value = null; if (key != null) { if (buildContext != null) { value = (String) buildContext.getValue(key); } if (value == null) { value = fallbackStorage.getProperty(key); } } return value; } BuildContextHolder();  BuildContextHolder(final BuildContext buildContext, final File buildDirectory); String getValue(final String key); void setValue(final String key, final String value); void setIncrementalBuildEnabled(final boolean incrementalBuildEnabled); boolean isIncrementalBuild(); void destroy(); void persist();  }### Answer:
@Test public void shouldInvokeGetValueOnBuildContext() { initVictimWithBuildContext(); victim.getValue(KEY); verify(buildContext).getValue(KEY); }
@Test public void shouldLoadExistingDefaultValue() throws IOException { final File tempFile = WroUtil.createTempFile(); try { final Properties props = new Properties(); props.setProperty(KEY, VALUE); props.store(new FileOutputStream(tempFile), null); victim = new BuildContextHolder() { @Override File newFallbackStorageFile(final File rootFolder) { return tempFile; } }; assertEquals(VALUE, victim.getValue(KEY)); } finally { FileUtils.deleteQuietly(tempFile); } }
@Test public void shouldNotHaveAnyValueByDefault() { assertNull(victim.getValue(KEY)); }