blob: c3a428437d0e35a1bae35423c5d6f5402f9f5b64 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.util;
import junit.framework.TestCase;
public class CertainlyCloneableTest extends TestCase {
private class Foo extends CertainlyCloneable<Foo> {
protected Foo callParentClone() throws CloneNotSupportedException {
throw new CloneNotSupportedException("Foo");
}
}
public void testSimple() {
try{
Foo f = new Foo();
f.clone();
fail("Control should not get here");
} catch (Error e) {
assertEquals("Foo", e.getCause().getMessage());
}
}
}
|