@Test
public void testHasAssertionValidCase() {

    List<AstNode> nameNodes = new LinkedList<>();
    List<AstNode> children = new LinkedList<>();
    AstNode systemNodeMock = mock(AstNode.class);
    when(systemNodeMock.getTokenOriginalValue()).thenReturn("System");
    nameNodes.add(systemNodeMock);
    AstNode dotNodeMock = mock(AstNode.class);
    when(dotNodeMock.getTokenOriginalValue()).thenReturn(".");
    AstNode assertEqualsNodeMock = mock(AstNode.class);
    when(assertEqualsNodeMock.getTokenOriginalValue()).thenReturn("assertEquals");
    children.add(systemNodeMock);
    children.add(dotNodeMock);
    children.add(assertEqualsNodeMock);
    when(systemNodeMock.getChildren()).thenReturn(children);
    assertTrue(MethodChecksUtils.hasAssertion(nameNodes, SYSTEM_ASSERT_PATTERN));
}