create test class for supervisor.
add Javadoc and refactor minor stuff.
link cache to SDK.