- }
- catch(NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
- fail();
- }
- }
-
- @Test
- public void changeClusterVotingTest() {
- try {
- ClusterActor actor = new ClusterActor();
- actor.setMember("some-member");
- actor.setNode("some-Node");
- ArrayList<ClusterActor> activeList = new ArrayList<>();
- activeList.add(actor);
- ArrayList<ClusterActor> standbyList = new ArrayList<>();
- standbyList.add(actor);
- Field field = provider.getClass().getDeclaredField("self");
- field.setAccessible(true);
- field.set(provider, actor);
- Method method = provider.getClass().getDeclaredMethod("changeClusterVoting", FailoverOutputBuilder.class, ArrayList.class, ArrayList.class, String.class);
- method.setAccessible(true);
- method.invoke(provider, new FailoverOutputBuilder(), activeList, standbyList, "80");
- }
- catch(NoSuchMethodException | IllegalAccessException | InvocationTargetException | NoSuchFieldException e) {