Adding Java endpoint test