### Question:
ImageCanaryInternal { @VisibleForTesting Runnable inspectInner(WeakReference<Activity> activity, ImageCanary imageCanaryEngine, Set<ImageIssue> imageIssues) { return () -> { try { Activity p = activity.get(); if (p != null) { ViewGroup parent = (ViewGroup) p.getWindow().getDecorView(); recursiveLoopChildren(p, parent, imageCanaryEngine, imageIssues); } } catch (Throwable e) { L.e(e); } }; } ImageCanaryInternal(ImageCanaryConfigProvider imageCanaryConfigProvider);   }### Answer:
@Test public void inspectInner() { ActivityController<Test4ImageActivity> activityController = Robolectric.buildActivity(Test4ImageActivity.class).create().start().resume(); Test4ImageActivity activity = activityController.get(); ImageCanaryInternal imageCanaryInternal = new ImageCanaryInternal(new DefaultImageCanaryConfigProvider()); ImageCanary imageCanary = new ImageCanary(); HashSet<ImageIssue> hashSet = new HashSet<ImageIssue>(); ImageIssue imageIssue = new ImageIssue(); imageIssue.activityHashCode = activity.hashCode(); imageIssue.imageViewHashCode = activity.imageView3().hashCode(); imageIssue.bitmapWidth = 200; imageIssue.bitmapHeight = 100; imageIssue.issueType = ImageIssue.IssueType.BITMAP_QUALITY_TOO_HIGH; hashSet.add(imageIssue); imageCanaryInternal.inspectInner(new WeakReference<>(activity), imageCanary, hashSet).run(); imageCanary.subject().test().assertValueAt(0, new Predicate<ImageIssue>() { @Override public boolean test(ImageIssue imageIssue) throws Exception { Log4Test.d(imageIssue); return imageIssue.activityHashCode == activity.hashCode() && imageIssue.bitmapWidth == 200 && imageIssue.bitmapHeight == 100 && imageIssue.imageViewWidth == 50 && imageIssue.imageViewHeight == 50 && imageIssue.issueType == ImageIssue.IssueType.BITMAP_QUALITY_TOO_HIGH; } }).assertValueAt(1, new Predicate<ImageIssue>() { @Override public boolean test(ImageIssue imageIssue) throws Exception { Log4Test.d(imageIssue); return imageIssue.activityHashCode == activity.hashCode() && imageIssue.bitmapWidth == 200 && imageIssue.bitmapHeight == 100 && imageIssue.imageViewWidth == 500 && imageIssue.imageViewHeight == 500 && imageIssue.issueType == ImageIssue.IssueType.BITMAP_QUALITY_TOO_LOW; } }).assertValueCount(2); Assert.assertEquals(3, hashSet.size()); }