### Question:
WXImage extends WXComponent<ImageView> { @WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (getInstance().getImageNetworkHandler() != null) { String localUrl = getInstance().getImageNetworkHandler().fetchLocal(src); if (!TextUtils.isEmpty(localUrl)) { src = localUrl; } } if (src == null&&!getAttrs().containsKey(Constants.Name.PLACEHOLDER)) { return; } ImageView image = getHostView(); if(image != null){ if(image.getDrawable() != null && !TextUtils.equals(mSrc, src)){ image.setImageDrawable(null); } } this.mSrc = src; WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { int blur = 0; String blurStr = getStyles().getBlur(); blur = parseBlurRadius(blurStr); setRemoteSrc(rewrited, blur); } } @Deprecated  WXImage(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXImage(WXSDKInstance instance, WXVContainer parent, BasicComponentData basicComponentData); @Override void refreshData(WXComponent component); @WXComponentProp(name = Constants.Name.RESIZE_MODE) void setResizeMode(String resizeMode); @WXComponentProp(name = Constants.Name.RESIZE) void setResize(String resize); @WXComponentProp(name = Constants.Name.SRC) void setSrc(String src); @Override void recycled(); void autoReleaseImage(); void autoRecoverImage(); @Override void updateProperties(Map<String, Object> props); @JSMethod(uiThread = false) void save(final JSCallback saveStatuCallback); @Override void destroy(); static final String SUCCEED; static final String ERRORDESC; }### Answer:
@Test public void testSetSrc() throws Exception { TestDomObject.setAttribute((WXDomObject)mWXImage.getDomObject(),PowerMockito.mock(WXAttr.class)); PowerMockito.when(mWXImage.getDomObject().getAttrs().getImageSharpen()).thenReturn(WXImageSharpen.SHARPEN); mWXImage.setSrc(""); }