### Question:
FieldPath { static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } } private  FieldPath(List<String> segments); private  FieldPath(com.google.firebase.firestore.model.FieldPath internalPath); @NonNull static FieldPath of(String... fieldNames); @NonNull static FieldPath documentId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void emptyPathIsInvalid() { FieldPath.fromDotSeparatedPath(""); }
@Test(expected = IllegalArgumentException.class) public void emptyFirstSegmentIsInvalid() { FieldPath.fromDotSeparatedPath(".a"); }
@Test(expected = IllegalArgumentException.class) public void emptyLastSegmentIsInvalid() { FieldPath.fromDotSeparatedPath("a."); }
@Test(expected = IllegalArgumentException.class) public void emptyMiddleSegmentIsInvalid() { FieldPath.fromDotSeparatedPath("a..b"); }