TLS-Attacker is a Java-based framework for analyzing TLS libraries. It can be used to manually test TLS clients and servers or as as a software library for more advanced tools.
You can simply set -transport_handler_type UDP and -version DTLS and you are ready to go. If you want to do it in code you have to set the respective config fields
I want to test DTLS, how should I do?