found a nice recipe here. https://medium.com/w-logs/installing-java-11-on-macos-with-homebrew-7f73c1e9fadf
Setting the environment variable JAVA_HOME causes /usr/bin/java to use a different version.
csh> brew cask install java
csh> /usr/libexec/java_home -v11
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
csh> setenv JAVA_HOME `/usr/libexec/java_home -v11`
csh> java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
After that sbt test no longer dies with error reported above, and I get all tests pass.
yipee, thanks everyone for the help