### Question:
RemoteAssetDecorator implements ResourceDecorator { protected boolean accepts(final Resource resource) throws RepositoryException {ValueMap props = resource.getValueMap(); if (!DamConstants.NT_DAM_ASSETCONTENT.equals(props.get(JcrConstants.JCR_PRIMARYTYPE))) { return false; } if (!props.get(RemoteAssets.IS_REMOTE_ASSET, false)) { return false; } Calendar lastFailure = props.get(RemoteAssets.REMOTE_SYNC_FAILED, (Calendar) null); if (lastFailure != null && System.currentTimeMillis() < (lastFailure.getTimeInMillis() + (this.config.getRetryDelay() * 60000))) { return false; } boolean matchesSyncPath = false; for (String syncPath : this.config.getDamSyncPaths()) { if (resource.getPath().startsWith(syncPath)) { matchesSyncPath = true; } } return matchesSyncPath && isAllowedUser(resource); }  @Override Resource decorate(final Resource resource); @Deprecated @Override Resource decorate(final Resource resource, final HttpServletRequest request);  }### Answer:
@Test public void testGetResourceHandlesExceptionCheckingIfResourceIsRemoteAsset() throws RepositoryException { setupFinish(); ResourceResolver userResourceResolver = getUserResourceResolver(); doThrow(new RuntimeException("test exception")).when(remoteAssetDecorator).accepts(any(Resource.class)); assertResourceDoesNotSync(getUserResourceResolver(), TEST_REMOTE_ASSET_CONTENT_PATH); LogTester.assertLogText("Failed binary sync check for remote asset: " + TEST_REMOTE_ASSET_CONTENT_PATH); }