### Question:
AboutFragmentLineProcessor implements Resources.LineProcessor { @Nonnull @Override public String process(@Nonnull String line) { return line.replace(APP_VERSION, version); } AboutFragmentLineProcessor(@Nonnull Application application); @Nonnull @Override String process(@Nonnull String line);  }### Answer:
@Test public void testShouldSubstituteAppVersion() throws Exception { assertEquals("Version: test.", processor.process("Version: " + APP_VERSION + ".")); assertEquals("test", processor.process(APP_VERSION)); assertEquals("test test test", processor.process(APP_VERSION + " " + APP_VERSION + " " + APP_VERSION)); }
@Test public void testShouldUseEmptyVersionInCaseOfNull() throws Exception { prepareProcessorForVersion(null); assertEquals("Version: .", processor.process("Version: " + APP_VERSION + ".")); }