App layout problem

When I use the App layout and I put a new layout in MainView, it doesn’t behave like it’s supposed to, for example, the label (vaadin label, not java) doesn’t appear

my code:

public class MainView extends VerticalLayout {
    public MainView() {
        AppLayout appLayout = new AppLayout();
        AppLayoutMenu menu = appLayout.createMenu();
        menu.addMenuItems(new AppLayoutMenuItem("asd"));
        HorizontalLayout test = new HorizontalLayout();
        test.add(new Label("not showing"));
        add(appLayout, test);

instead of composition, i would rather create a component (class) which extends AppLayout. Then, add a Route annotation to MainView and specify the new class as the layout parameter of Route annotation .