### Question:
LocalDhisResourceRepositoryTemplate { @Nonnull public Collection<T> find( @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ) { return find( null, filter, collectionSupplier, localOnly, methodName, args ); } LocalDhisResourceRepositoryTemplate( @Nonnull Class<T> resourceClass, @Nonnull RequestCacheService requestCacheService,
        @Nonnull LocalDhisRepositoryPersistCallback<T> persistCallback ); @Nonnull T save( @Nonnull T resource ); @Nonnull T save( @Nonnull T resource, @Nullable Consumer<T> localResourceConsumer ); boolean deleteById( @Nonnull String id, @Nonnull Function<String, T> prototypeFunction ); @Nonnull Optional<T> findOneById( @Nonnull String id, @Nonnull Function<String, T> callback ); boolean isLocal( @Nonnull String id ); @Nonnull Collection<T> find( @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); @Nonnull Collection<T> find( @Nullable String trackedEntityInstanceId, @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); static final String CONTAINER_REQUEST_CACHE_ATTRIBUTE_NAME; static final String RESOURCE_KEY_REQUEST_CACHE_ATTRIBUTE_NAME; }### Answer:
@Test public void findNoLocal() { final Predicate<TrackedEntityInstance> filter = tei -> true; final List<TrackedEntityInstance> result = Arrays.asList( new TrackedEntityInstance(), new TrackedEntityInstance() ); final Collection<TrackedEntityInstance> r = template.find( filter, () -> result, false, "test", "val1", null, "val2" ); Assert.assertThat( r, Matchers.containsInAnyOrder( result.get( 0 ), result.get( 1 ) ) ); }