Test bootstrap agent
Rewrite in Scala