### Question:
ImageModeHelper { @Nullable public static String getRenderStrategyProperty(final Properties properties) { return getRenderStrategyProperty(new StringPropertyAdapter(properties)); } private  ImageModeHelper(); @Nullable static String getAreaProviderProperty(final Properties properties); @Nullable static String getAreaProviderProperty(@Nonnull final Map<String, String> properties); @Nullable static String getAreaProviderProperty(@Nullable final String imageModeProperty); @Nullable static String getRenderStrategyProperty(final Properties properties); @Nullable static String getRenderStrategyProperty(@Nonnull final Map<String, String> properties); @Nullable static String getRenderStrategyProperty(@Nullable final String imageModeProperty);  }### Answer:
@Test public void testGetRenderStrategyPropertyExtractsNormalImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_normalProperties); assertEquals(renderStrategyProperty, "resize"); verify(m_normalProperties); }
@Test public void testGetRenderStrategyPropertyExtractsImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_resizeProperties); assertEquals(renderStrategyProperty, "nine-part:0,1,2,3,4,5,6,7,8,9,10,11"); verify(m_resizeProperties); }
@Test public void testGetRenderStrategyPropertyExtractsSubImageImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_subImageProperties); assertEquals(renderStrategyProperty, "resize"); verify(m_subImageProperties); }
@Test public void testGetRenderStrategyPropertyExtractsRepeatImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_repeatProperties); assertEquals(renderStrategyProperty, "repeat"); verify(m_repeatProperties); }
@Test public void testGetRenderStrategyPropertyExtractsSpriteImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_spriteProperties); assertEquals(renderStrategyProperty, "resize"); verify(m_spriteProperties); }
@Test public void testGetRenderStrategyPropertyExtractsSpriteResizeImageMode() { String renderStrategyProperty = ImageModeHelper.getRenderStrategyProperty(m_spriteResizeProperties); assertEquals(renderStrategyProperty, "nine-part:3,4,5,6,7,8,9,10,11,12,13,14"); verify(m_spriteResizeProperties); }
@Test public void testGetRenderStrategyPropertyReturnsRenderStrategyPropertyWhenFound() { Properties properties = createMock(Properties.class); expect(properties.getProperty("imageMode")).andReturn(null); expect(properties.getProperty("renderStrategy")).andReturn("dummy:foo"); replay(properties); assertEquals(ImageModeHelper.getRenderStrategyProperty(properties), "dummy:foo"); verify(properties); }
@Test public void testGetRenderStrategyPropertyReturnsNullWithUnknownProperty() { Properties properties = createMock(Properties.class); expect(properties.getProperty("imageMode")).andReturn("blah:1,2,3"); expect(properties.getProperty("renderStrategy")).andReturn(null); replay(properties); assertNull(ImageModeHelper.getRenderStrategyProperty(properties)); verify(properties); }
@Test public void testGetRenderStrategyPropertyReturnsNullWithUnknownImageMode() { Properties properties = createMock(Properties.class); expect(properties.getProperty("imageMode")).andReturn("blah:1,2,3"); expect(properties.getProperty("renderStrategy")).andReturn(null); replay(properties); assertNull(ImageModeHelper.getRenderStrategyProperty(properties)); verify(properties); }