rework java test, add enum support