Your are trying to Unit Test some code that is normally run in the Worklight Server environment, it depends on
WorklightConfiguration.getInstance().getString(propertyName);
and that can only function inside the server not when run as a stand-alone Unit test under something such as JUnit.
How to solve this? First, exactly what are you trying to test? Are you really trying to test that WorklightConfiguration.getInstance().getString() works? Why would you do such a thing? Do you propose to test every Worklight API? I claim that your should be Unit testing your code, not Worklight. So if you have code such as this pseudo code:
figure out the name of a property
WorklightConfiguration.getInstance().getString(thePropertyWeJustFigured)
do some stuff with the value we obtained
then you can unit test your code by providing a Mock implementation of the WorklightConfiguration API. You can use frameworks such as JMock, you are then in the position that your code will execute inside JUnit without depedencies on Worklight. This is true UNIT testing, testing without dependedencies.
Personally I don't much favour this approach, the effort in preparing the Mocks is quite large. Instead I prefer to do structured Integration Tests. That is I test the adapter as a whole, while it runs inside the Worklight server. I may well still use JUnit but the tests it runs use an HTTP invocation framework to invoke the adapter. So the test script goes:
ensure worklight server is running and adapter under test is deployed
run JUnit tests that issue HTTP requests to the adapter and inspect the results.