I need to test rest api and need to access repository beans and service beans that are behind controllers in my Spring we application. How do I access them? Using JMX is it possible?
AccountRepository accountRepository = getBean(austin, AccountRepository.class);
protected SpringServerResource austin;
public <T> T getBean(SpringServerResource resource, String beanName, Class<T> beanType) {
return resource.getServer().getContext().getBean(beanName, beanType);
}