you still duplicate code in runtime client test and embedded test. 
please redesign it.