Rework of test embedded server. Create new JUnit rule for testing