@Test
public void test_getSelfServiceTokenWithAppRole_sscred_failure() throws Exception {

ring jsonStr = "{\"role_id\":\"testroleid\",\"secret_id\":\"testsecretid\"}";
    ReflectionTestUtils.setField(tokenUtils, "selfserviceUsername", "dGVzdGFkbWlu");
    ReflectionTestUtils.setField(tokenUtils, "selfservicePassword", "dGVzdGFkbWlu");
    ReflectionTestUtils.setField(tokenUtils, "vaultAuthMethod", "userpass");
    
    SSCred sscred = new SSCred();
    sscred.setUsername("dGVzdGFkbWlu");
    sscred.setPassword("dGVzdGFkbWlu");
    ReflectionTestUtils.setField(ControllerUtil.class,"sscred", sscred);
    ReflectionTestUtils.setField(ControllerUtil.class,"ssUsername", sscred.getUsername());
    ReflectionTestUtils.setField(ControllerUtil.class,"ssPassword", sscred.getPassword());
    
    when(JSONUtil.getJSON(Mockito.any())).thenReturn(jsonStr);
    Response response = getMockResponse(HttpStatus.BAD_REQUEST, true, "{\n" + 
    		"  \"error\": \"no response from server\"\n" + 
    		"}");
    when(reqProcessor.process("/auth/approle/login",jsonStr,"")).thenReturn(response);
    String token = tokenUtils.getSelfServiceTokenWithAppRole();
    assertNull(token);
}