1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.ui
.tests
.control
.model
.component
;
14 import junit
.framework
.Test
;
15 import junit
.framework
.TestCase
;
16 import junit
.framework
.TestSuite
;
18 import org
.eclipse
.linuxtools
.lttng
.stubs
.service
.TestRemoteSystemProxy
;
19 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.IChannelInfo
;
20 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.ITraceControlComponent
;
21 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.TargetNodeState
;
22 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.TraceEnablement
;
23 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.TraceEventType
;
24 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.TraceLogLevel
;
25 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.TraceSessionState
;
26 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.BaseEventComponent
;
27 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.KernelProviderComponent
;
28 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TargetNodeComponent
;
29 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceChannelComponent
;
30 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceControlComponent
;
31 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceEventComponent
;
32 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceProviderGroup
;
33 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceSessionComponent
;
34 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.TraceSessionGroup
;
35 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
.UstProviderComponent
;
36 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.property
.TargetNodePropertySource
;
37 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.service
.ILttngControlService
;
38 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.service
.LTTngControlService
;
39 import org
.eclipse
.rse
.core
.model
.Host
;
40 import org
.eclipse
.rse
.core
.model
.IHost
;
41 import org
.eclipse
.rse
.internal
.core
.model
.SystemProfile
;
42 import org
.eclipse
.swt
.graphics
.Image
;
43 import org
.eclipse
.ui
.views
.properties
.IPropertySource
;
44 import org
.junit
.After
;
45 import org
.junit
.Before
;
48 * The class <code>TraceControlTreeModelTest</code> contains tests for the tree component classes.
50 @SuppressWarnings("nls")
51 public class TraceControlTreeModelTest
extends TestCase
{
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
57 // ------------------------------------------------------------------------
59 // ------------------------------------------------------------------------
62 * Returns test setup used when executing test case stand-alone.
63 * @return Test setup class
65 public static Test
suite() {
66 return new ModelImplTestSetup(new TestSuite(TraceControlTreeModelTest
.class));
69 // ------------------------------------------------------------------------
71 // ------------------------------------------------------------------------
74 * Perform pre-test initialization.
77 * if the initialization fails for some reason
82 public void setUp() throws Exception
{
86 * Perform post-test clean-up.
89 * if the clean-up fails for some reason
94 public void tearDown() throws Exception
{
98 * Run the TraceControlComponent.
100 public void testTraceControlComponents()
103 TestRemoteSystemProxy proxy
= new TestRemoteSystemProxy();
105 ITraceControlComponent root
= TraceControlTestFacility
.getInstance().getControlView().getTraceControlRoot();
107 @SuppressWarnings("restriction")
108 IHost host
= new Host(new SystemProfile("myProfile", true));
109 host
.setHostName("127.0.0.1");
111 TargetNodeComponent node
= new TargetNodeComponent("myNode", root
, host
, proxy
);
116 TraceControlTestFacility
.getInstance().waitForJobs();
118 // ------------------------------------------------------------------------
119 // Verify Parameters of TargetNodeComponent
120 // ------------------------------------------------------------------------
121 assertEquals("127.0.0.1", node
.getHostName());
122 assertEquals("127.0.0.1", node
.getToolTip());
123 Image connectedImage
= node
.getImage();
124 assertNotNull(connectedImage
);
125 assertEquals(TargetNodeState
.CONNECTED
, node
.getTargetNodeState());
126 assertNotNull(node
.getControlService());
127 ILttngControlService service
= node
.getControlService();
128 assertTrue(service
instanceof LTTngControlService
);
129 node
.setControlService(service
);
130 assertTrue(node
.getControlService() instanceof LTTngControlService
);
132 assertTrue(node
.isPassiveCommunicationsListener());
134 // ------------------------------------------------------------------------
135 // Verify Children of TargetNodeComponent
136 // ------------------------------------------------------------------------
137 ITraceControlComponent
[] groups
= node
.getChildren();
138 assertNotNull(groups
);
139 assertEquals(2, groups
.length
);
141 assertTrue(groups
[0] instanceof TraceProviderGroup
);
142 assertTrue(groups
[1] instanceof TraceSessionGroup
);
144 assertEquals("Provider", groups
[0].getName());
145 assertEquals("Sessions", groups
[1].getName());
147 // ------------------------------------------------------------------------
148 // Verify TraceProviderGroup
149 // ------------------------------------------------------------------------
150 ITraceControlComponent
[] providers
= groups
[0].getChildren();
152 assertNotNull(providers
);
153 assertEquals(3, providers
.length
);
155 // ------------------------------------------------------------------------
156 // Verify UstProviderComponent
157 // ------------------------------------------------------------------------
158 KernelProviderComponent kernelProvider
= (KernelProviderComponent
) providers
[0];
160 // ------------------------------------------------------------------------
161 // Verify event info (kernel provider)
162 // ------------------------------------------------------------------------
163 ITraceControlComponent
[] events
= kernelProvider
.getChildren();
164 assertNotNull(events
);
165 assertEquals(3, events
.length
);
167 BaseEventComponent baseEventInfo
= (BaseEventComponent
) events
[0];
168 assertNotNull(baseEventInfo
);
169 assertEquals("sched_kthread_stop", baseEventInfo
.getName());
170 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
171 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
173 baseEventInfo
= (BaseEventComponent
) events
[1];
174 assertEquals("sched_kthread_stop_ret", baseEventInfo
.getName());
175 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
176 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
178 baseEventInfo
= (BaseEventComponent
) events
[2];
179 assertEquals("sched_wakeup_new", baseEventInfo
.getName());
180 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
181 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
183 // ------------------------------------------------------------------------
184 // Verify UstProviderComponent
185 // ------------------------------------------------------------------------
186 UstProviderComponent ustProvider
= (UstProviderComponent
) providers
[1];
187 assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", ustProvider
.getName());
188 assertEquals(9379, ustProvider
.getPid());
190 // ------------------------------------------------------------------------
191 // Verify event info (UST provider)
192 // ------------------------------------------------------------------------
193 events
= ustProvider
.getChildren();
194 assertNotNull(events
);
195 assertEquals(2, events
.length
);
197 baseEventInfo
= (BaseEventComponent
) events
[0];
198 assertNotNull(baseEventInfo
);
199 assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo
.getName());
200 assertEquals(TraceLogLevel
.TRACE_DEBUG_MODULE
, baseEventInfo
.getLogLevel());
201 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
203 baseEventInfo
= (BaseEventComponent
) events
[1];
204 assertEquals("ust_tests_hello:tptest", baseEventInfo
.getName());
205 assertEquals(TraceLogLevel
.TRACE_INFO
, baseEventInfo
.getLogLevel());
206 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
208 // ------------------------------------------------------------------------
209 // Verify UstProviderComponent
210 // ------------------------------------------------------------------------
211 ustProvider
= (UstProviderComponent
) providers
[2];
212 assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", ustProvider
.getName());
213 assertEquals(4852, ustProvider
.getPid());
215 // verify getters and setter
216 verifyUstProviderGettersSetters(ustProvider
);
218 // ------------------------------------------------------------------------
219 // Verify event info (UST provider)
220 // ------------------------------------------------------------------------
221 events
= ustProvider
.getChildren();
222 assertNotNull(events
);
223 assertEquals(2, events
.length
);
225 baseEventInfo
= (BaseEventComponent
) events
[0];
226 assertNotNull(baseEventInfo
);
227 assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo
.getName());
228 assertEquals(TraceLogLevel
.TRACE_WARNING
, baseEventInfo
.getLogLevel());
229 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
231 baseEventInfo
= (BaseEventComponent
) events
[1];
232 assertEquals("ust_tests_hello:tptest", baseEventInfo
.getName());
233 assertEquals(TraceLogLevel
.TRACE_DEBUG_FUNCTION
, baseEventInfo
.getLogLevel());
234 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
236 // verify getters and setters
237 verifyBaseEventGettersSetters(baseEventInfo
);
239 // ------------------------------------------------------------------------
240 // Verify TraceSessionGroup
241 // ------------------------------------------------------------------------
242 ITraceControlComponent
[] sessions
= groups
[1].getChildren();
243 assertNotNull(sessions
);
244 assertEquals(2, sessions
.length
);
245 for (int i
= 0; i
< sessions
.length
; i
++) {
246 assertTrue(sessions
[i
] instanceof TraceSessionComponent
);
248 assertEquals("mysession1", sessions
[0].getName());
249 assertEquals("mysession", sessions
[1].getName());
251 // ------------------------------------------------------------------------
252 // Verify TraceSessionComponent
253 // ------------------------------------------------------------------------
254 TraceSessionComponent session
= (TraceSessionComponent
)sessions
[1];
255 assertEquals("mysession", session
.getName());
256 assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session
.getSessionPath());
257 assertEquals(TraceSessionState
.ACTIVE
, session
.getSessionState());
259 // Verify setters and setters
260 verifySessionGetterSetters(session
);
262 ITraceControlComponent
[] domains
= session
.getChildren();
263 assertNotNull(domains
);
264 assertEquals(2, domains
.length
);
266 // ------------------------------------------------------------------------
267 // Verify Kernel domain
268 // ------------------------------------------------------------------------
269 assertEquals("Kernel", domains
[0].getName());
270 ITraceControlComponent
[] channels
= domains
[0].getChildren();
271 assertNotNull(channels
);
272 assertEquals(2, channels
.length
);
274 // ------------------------------------------------------------------------
275 // Verify Kernel's channel0
276 // ------------------------------------------------------------------------
277 assertTrue(channels
[0] instanceof TraceChannelComponent
);
278 TraceChannelComponent channel
= (TraceChannelComponent
) channels
[0];
279 assertEquals("channel0", channel
.getName());
280 assertEquals(4, channel
.getNumberOfSubBuffers());
281 assertEquals("splice()", channel
.getOutputType());
282 assertEquals(false, channel
.isOverwriteMode());
283 assertEquals(200, channel
.getReadTimer());
284 assertEquals(TraceEnablement
.ENABLED
, channel
.getState());
285 assertEquals(262144, channel
.getSubBufferSize());
286 assertEquals(0, channel
.getSwitchTimer());
288 // ------------------------------------------------------------------------
289 // Verify event info (kernel, channel0)
290 // ------------------------------------------------------------------------
291 ITraceControlComponent
[] channel0Events
= channel
.getChildren();
292 assertNotNull(channel0Events
);
293 assertEquals(2, channel0Events
.length
);
294 assertTrue(channel0Events
[0] instanceof TraceEventComponent
);
295 assertTrue(channel0Events
[1] instanceof TraceEventComponent
);
297 TraceEventComponent event
= (TraceEventComponent
) channel0Events
[0];
298 assertEquals("block_rq_remap", event
.getName());
299 assertEquals(TraceLogLevel
.TRACE_EMERG
, event
.getLogLevel());
300 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
301 assertEquals(TraceEnablement
.ENABLED
, event
.getState());
303 event
= (TraceEventComponent
) channel0Events
[1];
304 assertEquals("block_bio_remap", event
.getName());
305 assertEquals(TraceLogLevel
.TRACE_EMERG
, event
.getLogLevel());
306 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
307 assertEquals(TraceEnablement
.DISABLED
, event
.getState());
309 // ------------------------------------------------------------------------
310 // Verify Kernel's channel1
311 // ------------------------------------------------------------------------
312 assertEquals("channel1", channels
[1].getName());
313 channel
= (TraceChannelComponent
) channels
[1];
314 assertEquals(4, channel
.getNumberOfSubBuffers());
315 assertEquals("splice()", channel
.getOutputType());
316 assertEquals(true, channel
.isOverwriteMode());
317 assertEquals(400, channel
.getReadTimer());
318 assertEquals(TraceEnablement
.DISABLED
, channel
.getState());
319 assertEquals(524288, channel
.getSubBufferSize());
320 assertEquals(100, channel
.getSwitchTimer());
322 // ------------------------------------------------------------------------
323 // Verify event info (kernel, channel1)
324 // ------------------------------------------------------------------------
325 ITraceControlComponent
[] channel1Events
= channels
[1].getChildren();
326 assertEquals(0, channel1Events
.length
);
328 // ------------------------------------------------------------------------
329 // Verify domain UST global
330 // ------------------------------------------------------------------------
331 assertEquals("UST global", domains
[1].getName());
333 ITraceControlComponent
[] ustChannels
= domains
[1].getChildren();
335 for (int i
= 0; i
< ustChannels
.length
; i
++) {
336 assertTrue(ustChannels
[i
] instanceof TraceChannelComponent
);
339 // ------------------------------------------------------------------------
340 // Verify UST global's mychannel1
341 // ------------------------------------------------------------------------
342 channel
= (TraceChannelComponent
) ustChannels
[0];
343 assertEquals("mychannel1", channel
.getName());
344 assertEquals(8, channel
.getNumberOfSubBuffers());
345 assertEquals("mmap()", channel
.getOutputType());
346 assertEquals(true, channel
.isOverwriteMode());
347 assertEquals(100, channel
.getReadTimer());
348 assertEquals(TraceEnablement
.DISABLED
, channel
.getState());
349 assertEquals(8192, channel
.getSubBufferSize());
350 assertEquals(200, channel
.getSwitchTimer());
352 // verify getters and setters
353 verifyChannelGettersSetters(channel
);
355 // ------------------------------------------------------------------------
356 // Verify event info (UST global, mychannel1)
357 // ------------------------------------------------------------------------
358 ITraceControlComponent
[] ustEvents
= channel
.getChildren();
359 assertEquals(0, ustEvents
.length
);
361 // ------------------------------------------------------------------------
362 // Verify UST global's channel0
363 // ------------------------------------------------------------------------
364 channel
= (TraceChannelComponent
) ustChannels
[1];
365 assertEquals("channel0", channel
.getName());
366 assertEquals(4, channel
.getNumberOfSubBuffers());
367 assertEquals("mmap()", channel
.getOutputType());
368 assertEquals(false, channel
.isOverwriteMode());
369 assertEquals(200, channel
.getReadTimer());
370 assertEquals(TraceEnablement
.ENABLED
, channel
.getState());
371 assertEquals(4096, channel
.getSubBufferSize());
372 assertEquals(0, channel
.getSwitchTimer());
374 // ------------------------------------------------------------------------
375 // Verify event info (UST global, channel0)
376 // ------------------------------------------------------------------------
377 ustEvents
= channel
.getChildren();
378 assertEquals(2, ustEvents
.length
);
380 event
= (TraceEventComponent
) ustEvents
[0];
381 assertEquals("ust_tests_hello:tptest_sighandler", event
.getName());
382 assertEquals(TraceLogLevel
.TRACE_DEBUG_LINE
, event
.getLogLevel());
383 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
384 assertEquals(TraceEnablement
.DISABLED
, event
.getState());
386 event
= (TraceEventComponent
) ustEvents
[1];
387 assertEquals("*", ustEvents
[1].getName());
388 assertEquals(TraceLogLevel
.LEVEL_UNKNOWN
, event
.getLogLevel());
389 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
390 assertEquals(TraceEnablement
.ENABLED
, event
.getState());
392 // verify getters and setters
393 verifyEventGettersSetters(event
);
397 assertEquals(TargetNodeState
.DISCONNECTED
, node
.getTargetNodeState());
398 assertNotNull(node
.getImage());
399 assertNotSame(connectedImage
, node
.getImage());
402 private void verifySessionGetterSetters(TraceSessionComponent session
) {
403 // save original values
404 String name
= session
.getName();
405 String origPath
= session
.getSessionPath();
406 TraceSessionState origState
= session
.getSessionState();
409 session
.setName("newName");
410 assertEquals("newName", session
.getName());
412 session
.setSessionPath("/home/user/tmp");
413 assertEquals("/home/user/tmp", session
.getSessionPath());
415 session
.setSessionState(TraceSessionState
.INACTIVE
);
416 assertEquals(TraceSessionState
.INACTIVE
, session
.getSessionState());
417 Image inactiveImage
= session
.getImage();
418 assertNotNull(inactiveImage
);
420 session
.setSessionState("active");
421 assertEquals(TraceSessionState
.ACTIVE
, session
.getSessionState());
423 Image activeImage
= session
.getImage();
424 assertNotNull(activeImage
);
425 assertNotSame(activeImage
, inactiveImage
);
428 // restore original values
429 session
.setName(name
);
430 session
.setSessionPath(origPath
);
431 session
.setSessionState(origState
);
434 private void verifyBaseEventGettersSetters(BaseEventComponent event
) {
435 // save original values
436 String name
= event
.getName();
437 TraceLogLevel level
= event
.getLogLevel();
438 TraceEventType type
= event
.getEventType();
441 event
.setName("newName");
442 assertEquals("newName", event
.getName());
444 event
.setLogLevel(TraceLogLevel
.TRACE_INFO
);
445 assertEquals(TraceLogLevel
.TRACE_INFO
, event
.getLogLevel());
446 event
.setLogLevel("TRACE_ALERT");
447 assertEquals(TraceLogLevel
.TRACE_ALERT
, event
.getLogLevel());
449 event
.setEventType(TraceEventType
.UNKNOWN
);
450 assertEquals(TraceEventType
.UNKNOWN
, event
.getEventType());
451 event
.setEventType("tracepoint");
452 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
454 // restore original values
456 event
.setLogLevel(level
);
457 event
.setEventType(type
);
460 private void verifyEventGettersSetters(TraceEventComponent event
) {
461 // save original values
462 String name
= event
.getName();
463 TraceLogLevel level
= event
.getLogLevel();
464 TraceEventType type
= event
.getEventType();
465 TraceEnablement state
= event
.getState();
468 event
.setName("newName");
469 assertEquals("newName", event
.getName());
471 event
.setLogLevel(TraceLogLevel
.TRACE_INFO
);
472 assertEquals(TraceLogLevel
.TRACE_INFO
, event
.getLogLevel());
473 event
.setLogLevel("TRACE_ALERT");
474 assertEquals(TraceLogLevel
.TRACE_ALERT
, event
.getLogLevel());
476 event
.setEventType(TraceEventType
.UNKNOWN
);
477 assertEquals(TraceEventType
.UNKNOWN
, event
.getEventType());
478 event
.setEventType("tracepoint");
479 assertEquals(TraceEventType
.TRACEPOINT
, event
.getEventType());
481 event
.setState("disabled");
482 assertEquals(TraceEnablement
.DISABLED
, event
.getState());
484 Image disabledImage
= event
.getImage();
485 assertNotNull(disabledImage
);
487 event
.setState(TraceEnablement
.ENABLED
);
488 assertEquals(TraceEnablement
.ENABLED
, event
.getState());
490 Image enabledImage
= event
.getImage();
491 assertNotNull(enabledImage
);
492 assertNotSame(enabledImage
, disabledImage
);
494 // restore original values
496 event
.setLogLevel(level
);
497 event
.setEventType(type
);
498 event
.setState(state
);
501 private void verifyChannelGettersSetters(TraceChannelComponent channel
) {
502 // save original values
503 String name
= channel
.getName();
504 int nbSubBuffers
= channel
.getNumberOfSubBuffers();
505 String type
= channel
.getOutputType();
506 boolean mode
= channel
.isOverwriteMode();
507 long readTimer
= channel
.getReadTimer();
508 TraceEnablement state
= channel
.getState();
509 long subBufferSize
= channel
.getSubBufferSize();
510 long switchTimer
= channel
.getSwitchTimer();
513 channel
.setName("newName");
514 assertEquals("newName", channel
.getName());
516 channel
.setNumberOfSubBuffers(2);
517 assertEquals(2, channel
.getNumberOfSubBuffers());
519 channel
.setOutputType("splice()");
520 assertEquals("splice()", channel
.getOutputType());
522 channel
.setOverwriteMode(false);
523 assertEquals(false, channel
.isOverwriteMode());
525 channel
.setReadTimer(250);
526 assertEquals(250, channel
.getReadTimer());
528 channel
.setState("enabled");
529 assertEquals(TraceEnablement
.ENABLED
, channel
.getState());
531 Image enabledImage
= channel
.getImage();
532 assertNotNull(enabledImage
);
533 channel
.setState(TraceEnablement
.DISABLED
);
534 assertEquals(TraceEnablement
.DISABLED
, channel
.getState());
536 Image disabledImage
= channel
.getImage();
537 assertNotNull(disabledImage
);
538 assertNotSame(enabledImage
, disabledImage
);
540 channel
.setSubBufferSize(1024);
541 assertEquals(1024, channel
.getSubBufferSize());
543 channel
.setSwitchTimer(1000);
544 assertEquals(1000, channel
.getSwitchTimer());
546 // restore original values
547 channel
.setName(name
);
548 channel
.setNumberOfSubBuffers(nbSubBuffers
);
549 channel
.setOutputType(type
);
550 channel
.setOverwriteMode(mode
);
551 channel
.setReadTimer(readTimer
);
552 channel
.setState(state
);
553 channel
.setSubBufferSize(subBufferSize
);
554 channel
.setSwitchTimer(switchTimer
);
557 private void verifyUstProviderGettersSetters(UstProviderComponent ustProvider
) {
558 // save original values
559 String name
= ustProvider
.getName();
560 int pid
= ustProvider
.getPid();
563 ustProvider
.setName("newName");
564 assertEquals("newName", ustProvider
.getName());
566 ustProvider
.setPid(9876);
567 assertEquals(9876, ustProvider
.getPid());
569 // restore original values
570 ustProvider
.setName(name
);
571 ustProvider
.setPid(pid
);