Optional shouldn't be there. Optional is optimally used as the return type of a terminal stream operation. It is somewhat controversial, but possibly acceptable1, to use it as the return type of non-stream-related methods. It's flat out a mistake to use it anywhere else - it should not be the type of a field, it should not be the type of a method parameter, and it should not show up in any generic type. List<Optional<String>>, etcetera - don't have those.
You've stumbled on a practical example of why that is. To generalize the principle: Optional isn't part of the type system the way generics is, and is orthogonal relative to the type you're 'wrapped'. In other words, String and Optional<String> are as different as guns and grandmas are, and that's a problem because in your head they feel similar-ish. Even invoking .equals on an optional is itself dubious, as Optional is attempting to catch the semantic meaning of 'I convey the result of a particular invocation of a stream terminal', and we can hold a long philosophical debate as to whether the concept of 'the way this terminal ended' can ever even be considered as equal to a different run that so happened to produce the same object as result.
Generics has 4 different notions on any particular type:
List<Number>
List<? extends Number>
List<? super Number>
List (raw / legacy)
proper integration of optional in the type system requires a similar treatment: For example, you'd want the ability to write a method that accepts either a List<Optional<String>> or a List<String>. If the method always treats the elements in the string as optional (as in, checks for NONE, etc), but if it writes to the list, only writes actual Strings (and never Optional.NONE), then this method can process either form.
This is analogous to how a List<? super Number> can call .add(Number) and yet if it calls .get(0), that is of type Object and not Number.
Java does not support this.
There is no way to write such a method.
Hence, do not integrate optional - given that you can't write that method, you don't want List<Optional<String>> anywhere in your codebase. Instead, consider Optional as a fleeting data type: If you get an Optional from anywhere, 'unroll' that optional on the spot. Do not store it in a field, do not pass it to another method. The only slightly less fleeting notion you should be considering is to return it verbatim, putting the onus of unwrapping that optional on your caller. That is acceptable.
If you want to compound this mistake and make your code base worse, this WILL work. But I strongly advise against it!
pojoMappedByName.containsValue(Optional.of(pojotest))
(Optional's equals method is defined as: NONE is equal to NONE, and any 2 SOMEs are equal to each other if a.equals(b) holds, where a and b are the actual objects contained within the two optionals, which is why that works. Doesn't make it a good idea though, that's more of a 'its the least worst option amongst all available interpretations of what equality might mean between optionals'.
[1] A lot of methods in java core and major libraries just do not work that way. For example, if you consider Optional<T> to be the de-facto correct thing to return for a method that can return the concept 'not relevant' or 'not found', then obviously java.util.Map's .get(key) method should be returning an Optional<V>. It doesn't, and never will as it wouldn't be a backwards compatible change. Given that there's a ton of code out there that thus cannot just shift paradigm and probably never will, there's a lot of resistance to the idea, and living in a world where any given method that can conceptually return 'not found', 'not available', etc - would then force you to first check the docs to see if returns T and null indicates not found, or if it returns Optional<T>. Forcing that kind of dichotomy on the ecosystem is, naturally, controversial. I haven't yet heard of a workable proposal to get to a place where Optional has replaced null for all method return values in all major libraries (and the core library). Until one exists, it'll remain controversial, and I'd strongly suggest you don't go there, and avoid using Optional<T> as return value for methods unless they are stream related. However, some libraries and a minority (but significant minority) of programming teams are doing this. In contrast to using Optional in e.g. List<Optional<T>> or as method parameter type: Only a very small amount of dev teams are doing this and no style guide suggests it.