add junit test for regex