@Test
public void testAlignment() {
AbstractOrderedLayout layout = new AbstractOrderedLayout() {
};
AbstractComponent first = new AbstractComponent() {
};
AbstractComponent second = new AbstractComponent() {
};
layout.addComponent(first);
layout.addComponent(second);
Alignment alignment = Alignment.BOTTOM_RIGHT;
layout.setComponentAlignment(first, alignment);
layout.setComponentAlignment(second, Alignment.MIDDLE_CENTER);
AbstractComponent replace = new AbstractComponent() {
};
layout.replaceComponent(first, replace);
Assert.assertEquals("Alignment for replaced component is not "
+ "the same as for previous one", alignment,