expect(credstore.put("node#id", credentials)).andReturn(null);
replay(credstore);
NodeMetadata node = new NodeMetadataBuilder().ids("id").status(Status.RUNNING).credentials(credentials).build();
RefreshCredentialsForNode fn = new PersistNodeCredentialsModule.RefreshCredentialsForNode(credstore, null);
assertEquals(node, fn.apply(node));
verify(credstore);
}