It's more about opinion.
You are doing login in @BeforeClass
, it must be validated which you are doing correctly by doing Assert.assertTrue(homeObject.isLoggedIn());
this.
Because if login fails you might not wanna continue your testing.
Please note that @BeforeTest
is bigger unit in TestNG as compared to @BeforeClass
.
Personally I write login method in @BeforeMethod
followed by all @Test
methods in a class.
@BeforeClass
is a setupClass in which you might want to declare your prerequisite such as driver initialization and all.
So coming to your question , where we should assert and what is good practice.
Wherever validation is required we must assert. It is as simple as that.