You need to define another bean like so:
@Service(value="myServiceDefault")
public class MyServiceImpl implements MyService{
..
}
Then change your initial code for the test profile to:
@Service(value="myService")
@Profile("test")
@Primary
public class MyServiceImpl implements MyService{
...
}
What this does is register an implementation for all profiles to use and then when the test profile is active is uses the other implementation because of the @Primary annotation
If you are using Spring 4 you could come up with even more elaborate configuration strategies using the @Conditional annotation