### Question:
BaseGenerator implements Generator { protected String getImageName() { if (RuntimeMode.isOpenShiftMode(getProject().getProperties())) { return getConfigWithFallback(Config.name, "jshift.generator.name", "%a:%l"); } else { return getConfigWithFallback(Config.name, "jshift.generator.name", "%g/%a:%l"); } } BaseGenerator(GeneratorContext context, String name);  BaseGenerator(GeneratorContext context, String name, FromSelector fromSelector); String getName(); GeneratorContext getContext();  }### Answer:
@Test public void getImageName() { setupNameContext(null, "config_test_name"); BaseGenerator generator = createGenerator(null); assertEquals("config_test_name", generator.getImageName()); setupNameContext("prop_test_name", null); generator = createGenerator(null); assertEquals("prop_test_name", generator.getImageName()); setupNameContext("prop_test_name", "config_test_name"); generator = createGenerator(null); assertEquals("config_test_name", generator.getImageName()); setupNameContext(null, null); generator = createGenerator(null); assertEquals("%g/%a:%l", generator.getImageName()); }