public ExtentTest assignCategory(String category){
  String cat=category.replace(" ","");
  Category c=new Category();
  c.setName(cat);
  test.setCategory(c);
  extent.assignCategory(test,c);
  return this;
}

public ExtentTest assignCategory ( String category ) { String cat = category . replace ( " " , "" ) ; Category c = new Category ( ) ; c . setName ( cat ) ; test . setCategory ( c ) ; extent . assignCategory ( test , c ) ; return this ; }
assigns a category or group
