@Test
public void shouldLoginWithUserPassButThenFallbackToApiKeyMode() throws Exception {

  // given
  Properties properties = new Properties();
  properties.load(new FileInputStream(VALID_CONF_FILE_LOCATION));
  String user = (String) properties.get("username");
  String password = (String) properties.get("password");

  // when
  janbanery = janbaneryFactory.connectUsing(user, password).toWorkspace(EXISTING_WORKSPACE);

  // then, should use API key mode
  AuthProvider usedAuthProvider = janbanery.getAuthMode();
  assertThat(usedAuthProvider).isInstanceOf(ApiKeyAuthProvider.class);
}