@Test
public void getRegistryCredentials() {

    CreateAgentParameters params = CreateAgentParameters.from(Node.EMPTY_OBJECT);
    assertThat(params.getRegistryCredentials()).isEqualTo(DockerRegistryCredentials.ANONYMOUS);
    DockerRegistryCredentials credentials = DockerRegistryCredentials.from("foo", "bar");
    assertThat(params.registryCredentials(credentials).getRegistryCredentials()).isEqualTo(credentials);
    assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> params.pullStrategy(null));
}