// Get the NetworkService.
NetworkServiceInterface networkService = user.getService(DfpService.V201208.NETWORK_SERVICE);
// Make the test network.
Network network = networkService.makeTestNetwork();
System.out.println("Test network with network code \"" + network.getNetworkCode()
+ "\" and display name \"" + network.getDisplayName() + "\" created.\n"
+ "You may now sign in at http://www.google.com/dfp/main?networkCode="
+ network.getNetworkCode());
} catch (Exception e) {
e.printStackTrace();
}
}